Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-25 22:01:09 +08:00
14 changed files with 259 additions and 14 deletions
+2 -1
View File
@@ -70,6 +70,7 @@ export default {
{ name: 'Link', icon: 'link' },
{ name: 'Poster', icon: 'poster' },
{ name: 'Qrcode', icon: 'qrcode' },
{ name: 'Weapp Qrcode', icon: 'weapp-qrcode' },
],
],
};
@@ -131,7 +132,7 @@ export default {
| --- | --- | --- |
| name | Option name | _string_ |
| description `v2.8.5` | Option description | _string_ |
| icon | Option iconcan be set to `wechat` `weibo` `qq` `link` `qrcode` `poster` or image URL | _string_ |
| icon | Option iconcan 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
+2 -1
View File
@@ -82,6 +82,7 @@ export default {
{ name: '复制链接', icon: 'link' },
{ name: '分享海报', icon: 'poster' },
{ name: '二维码', icon: 'qrcode' },
{ name: '小程序码', icon: 'weapp-qrcode' },
],
],
};
@@ -179,7 +180,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
+3
View File
@@ -57,6 +57,7 @@ export default {
withDesc: '展示描述信息',
customIcon: '自定义图标',
description: '描述信息',
weappQrcode: '小程序码',
},
'en-US': {
qq: 'QQ',
@@ -72,6 +73,7 @@ export default {
withDesc: 'Show Description',
customIcon: 'Custom Icon',
description: 'Description',
weappQrcode: 'Weapp Qrcode',
},
},
@@ -108,6 +110,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' },
],
];
},
+9 -1
View File
@@ -4,7 +4,15 @@ import { createNamespace, pick } from '../utils';
// Components
import Popup, { popupSharedProps } from '../popup';
const PRESET_ICONS = ['qq', 'weibo', 'wechat', 'link', 'qrcode', 'poster'];
const PRESET_ICONS = [
'qq',
'link',
'weibo',
'wechat',
'poster',
'qrcode',
'weapp-qrcode',
];
function getIconURL(icon) {
if (PRESET_ICONS.indexOf(icon) !== -1) {