From 09c292aeb258779cc21dc9fd45efde041e2ed3aa Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 25 Nov 2020 20:35:02 +0800 Subject: [PATCH] feat(ShareSheet): support weapp-qrcode (#7635) --- src/share-sheet/README.md | 3 ++- src/share-sheet/README.zh-CN.md | 3 ++- src/share-sheet/demo/index.vue | 3 +++ src/share-sheet/index.js | 10 +++++++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/share-sheet/README.md b/src/share-sheet/README.md index 43e72f19a..c41a0d95d 100644 --- a/src/share-sheet/README.md +++ b/src/share-sheet/README.md @@ -69,6 +69,7 @@ export default { { name: 'Link', icon: 'link' }, { name: 'Poster', icon: 'poster' }, { name: 'Qrcode', icon: 'qrcode' }, + { name: 'Weapp Qrcode', icon: 'weapp-qrcode' }, ], ], }; @@ -129,7 +130,7 @@ export default { | --- | --- | --- | | name | Option name | _string_ | | description `v2.8.5` | Option description | _string_ | -| icon | Option icon,can be set to `wechat` `weibo` `qq` `link` `qrcode` `poster` or image URL | _string_ | +| icon | Option icon,can be set to `wechat` `weibo` `qq` `link` `qrcode` `poster` `weapp-qrcode` or image URL | _string_ | | className | Option className is used to set the class props to the share item | _string_ | ### Events diff --git a/src/share-sheet/README.zh-CN.md b/src/share-sheet/README.zh-CN.md index aee37131d..0e6d0680e 100644 --- a/src/share-sheet/README.zh-CN.md +++ b/src/share-sheet/README.zh-CN.md @@ -81,6 +81,7 @@ export default { { name: '复制链接', icon: 'link' }, { name: '分享海报', icon: 'poster' }, { name: '二维码', icon: 'qrcode' }, + { name: '小程序码', icon: 'weapp-qrcode' }, ], ], }; @@ -177,7 +178,7 @@ export default { | --- | --- | --- | | name | 分享渠道名称 | _string_ | | description `v2.8.5` | 分享选项描述 | _string_ | -| icon | 图标,可选值为 `wechat` `weibo` `qq` `link` `qrcode` `poster`,支持传入图片 URL | _string_ | +| icon | 图标,可选值为 `wechat` `weibo` `qq` `link` `qrcode` `poster` `weapp-qrcode`,支持传入图片 URL | _string_ | | className | 分享选项类名 | _string_ | ### Events diff --git a/src/share-sheet/demo/index.vue b/src/share-sheet/demo/index.vue index 62f042a33..e9d9b8250 100644 --- a/src/share-sheet/demo/index.vue +++ b/src/share-sheet/demo/index.vue @@ -67,6 +67,7 @@ export default { withDesc: '展示描述信息', customIcon: '自定义图标', description: '描述信息', + weappQrcode: '小程序码', }, 'en-US': { qq: 'QQ', @@ -82,6 +83,7 @@ export default { withDesc: 'Show Description', customIcon: 'Custom Icon', description: 'Description', + weappQrcode: 'Weapp Qrcode', }, }, @@ -118,6 +120,7 @@ export default { { name: this.t('link'), icon: 'link' }, { name: this.t('poster'), icon: 'poster' }, { name: this.t('qrcode'), icon: 'qrcode' }, + { name: this.t('weappQrcode'), icon: 'weapp-qrcode' }, ], ]; }, diff --git a/src/share-sheet/index.js b/src/share-sheet/index.js index 39335f436..5e5529535 100644 --- a/src/share-sheet/index.js +++ b/src/share-sheet/index.js @@ -7,7 +7,15 @@ import { popupMixinProps } from '../mixins/popup'; // Components import Popup from '../popup'; -const PRESET_ICONS = ['qq', 'weibo', 'wechat', 'link', 'qrcode', 'poster']; +const PRESET_ICONS = [ + 'qq', + 'link', + 'weibo', + 'wechat', + 'poster', + 'qrcode', + 'weapp-qrcode', +]; const [createComponent, bem, t] = createNamespace('share-sheet');