feat(ShareSheet): add options description (#6460)

* feat(share-sheet): share sheet add option

* feat(share-sheet): add options intro

* feat(ShareSheet): add options description

Co-authored-by: zhanglin <zhanglin_0715@youzan.com>
This commit is contained in:
木槿花开
2020-06-04 16:29:35 +08:00
committed by GitHub
co-authored by zhanglin
parent 472c4f35ae
commit c445b12507
6 changed files with 65 additions and 2 deletions
+19 -1
View File
@@ -122,7 +122,7 @@ export default {
### 展示描述信息
通过`description`属性可以设置标题下方的描述文字
通过`description`属性可以设置标题下方的描述文字, 给`options`属性设置`description`可以添加分享选项描述
```html
<van-share-sheet
@@ -133,6 +133,23 @@ export default {
/>
```
```js
export default {
data() {
return {
showShare: false,
options: [
{ name: '微信', icon: 'wechat' },
{ name: '微博', icon: 'weibo' },
{ name: '复制链接', icon: 'link', description: '描述信息' },
{ name: '分享海报', icon: 'poster' },
{ name: '二维码', icon: 'qrcode' },
],
};
},
};
```
## API
### Props
@@ -159,6 +176,7 @@ export default {
| 键名 | 说明 | 类型 |
| --- | --- | --- |
| name | 分享渠道名称 | _string_ |
| description | 分享选项描述 | _string_ |
| icon | 图标,可选值为 `wechat` `weibo` `qq` `link` `qrcode` `poster`,支持传入图片 URL | _string_ |
### Events