From bb445b74eff8a046196019029cd1ac37579f322e Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sat, 25 Jul 2020 22:04:21 +0800 Subject: [PATCH] feat: migrate ShareSheet component --- breaking-changes.md | 2 ++ components.js | 1 + src/share-sheet/README.md | 6 +++--- src/share-sheet/README.zh-CN.md | 8 ++++---- src/share-sheet/demo/index.vue | 8 ++++---- src/share-sheet/index.js | 19 +++++++++++++------ vant.config.js | 16 ++++++++-------- 7 files changed, 35 insertions(+), 25 deletions(-) diff --git a/breaking-changes.md b/breaking-changes.md index ea43013c2..9c0db1385 100644 --- a/breaking-changes.md +++ b/breaking-changes.md @@ -6,6 +6,8 @@ - Circle: `v-model` 重命名为 `v-model:currentRate` - Popup: `v-model` 重命名为 `v-model:show` +- ShareSheet: `v-model` 重命名为 `v-model:show` +- ActionSheet: `v-model` 重命名为 `v-model:show` - Switch: v-model 对应的属性 `value` 重命名为 `modelValue`,事件由 `input` 重命名为 `update:modelValue` - Sidebar: v-model 对应的属性 `activeKey` 重命名为 `modelValue`,事件由 `input` 重命名为 `update:modelValue` - TreeSelect: `active-id.sync` 重命名为 `v-model:active-id` diff --git a/components.js b/components.js index e00d27f28..571baf58b 100644 --- a/components.js +++ b/components.js @@ -32,4 +32,5 @@ module.exports = [ 'sidebar', 'tree-select', 'notice-bar', + 'share-sheet', ]; diff --git a/src/share-sheet/README.md b/src/share-sheet/README.md index ec78dec72..8c2ebdd4d 100644 --- a/src/share-sheet/README.md +++ b/src/share-sheet/README.md @@ -16,7 +16,7 @@ Vue.use(ShareSheet); ```html + ``` ```js @@ -80,7 +80,7 @@ export default { ```html @@ -93,7 +93,7 @@ export default { 除了使用内置的几种图标外,可以直接在 `icon` 中传入图片 URL 来使用自定义的图标。 ```html - + ``` ```js @@ -126,7 +126,7 @@ export default { ```html @@ -40,7 +40,7 @@ {this.genHeader()} {this.genRows()} diff --git a/vant.config.js b/vant.config.js index b9f626054..3fe9e0859 100644 --- a/vant.config.js +++ b/vant.config.js @@ -208,10 +208,10 @@ module.exports = { // path: 'pull-refresh', // title: 'PullRefresh 下拉刷新', // }, - // { - // path: 'share-sheet', - // title: 'ShareSheet 分享面板', - // }, + { + path: 'share-sheet', + title: 'ShareSheet 分享面板', + }, { path: 'swipe-cell', title: 'SwipeCell 滑动单元格', @@ -542,10 +542,10 @@ module.exports = { // path: 'pull-refresh', // title: 'PullRefresh', // }, - // { - // path: 'share-sheet', - // title: 'ShareSheet', - // }, + { + path: 'share-sheet', + title: 'ShareSheet', + }, { path: 'swipe-cell', title: 'SwipeCell',