From 47817a5209cf3320a06354334882a7f1a125a189 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 6 Sep 2018 14:11:45 +0800 Subject: [PATCH] [breaking change] Actionsheet: rename to ActionSheet (#514) --- dist/{actionsheet => action-sheet}/index.js | 0 dist/{actionsheet => action-sheet}/index.json | 0 dist/action-sheet/index.wxml | 38 +++++++++++++++++++ dist/{actionsheet => action-sheet}/index.wxss | 2 +- dist/actionsheet/index.wxml | 38 ------------------- docs/markdown/changelog.md | 2 +- docs/src/Preview.vue | 2 +- example/app.json | 2 +- example/config.js | 4 +- .../{actionsheet => action-sheet}/index.js | 6 +-- .../{actionsheet => action-sheet}/index.json | 4 +- example/pages/action-sheet/index.wxml | 32 ++++++++++++++++ .../{actionsheet => action-sheet}/index.wxss | 0 example/pages/actionsheet/index.wxml | 32 ---------------- .../{actionsheet => action-sheet}/README.md | 20 +++++----- .../{actionsheet => action-sheet}/index.js | 0 .../{actionsheet => action-sheet}/index.json | 0 .../{actionsheet => action-sheet}/index.pcss | 2 +- packages/action-sheet/index.wxml | 38 +++++++++++++++++++ packages/actionsheet/index.wxml | 38 ------------------- 20 files changed, 130 insertions(+), 130 deletions(-) rename dist/{actionsheet => action-sheet}/index.js (100%) rename dist/{actionsheet => action-sheet}/index.json (100%) create mode 100644 dist/action-sheet/index.wxml rename dist/{actionsheet => action-sheet}/index.wxss (50%) delete mode 100644 dist/actionsheet/index.wxml rename example/pages/{actionsheet => action-sheet}/index.js (87%) rename example/pages/{actionsheet => action-sheet}/index.json (53%) create mode 100644 example/pages/action-sheet/index.wxml rename example/pages/{actionsheet => action-sheet}/index.wxss (100%) delete mode 100644 example/pages/actionsheet/index.wxml rename packages/{actionsheet => action-sheet}/README.md (84%) rename packages/{actionsheet => action-sheet}/index.js (100%) rename packages/{actionsheet => action-sheet}/index.json (100%) rename packages/{actionsheet => action-sheet}/index.pcss (98%) create mode 100644 packages/action-sheet/index.wxml delete mode 100644 packages/actionsheet/index.wxml diff --git a/dist/actionsheet/index.js b/dist/action-sheet/index.js similarity index 100% rename from dist/actionsheet/index.js rename to dist/action-sheet/index.js diff --git a/dist/actionsheet/index.json b/dist/action-sheet/index.json similarity index 100% rename from dist/actionsheet/index.json rename to dist/action-sheet/index.json diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml new file mode 100644 index 00000000..61ca171c --- /dev/null +++ b/dist/action-sheet/index.wxml @@ -0,0 +1,38 @@ + + + {{ title }} + + + + + + {{ item.name }} + {{ item.subname }} + + + + + + {{ cancelText }} + + + + + diff --git a/dist/actionsheet/index.wxss b/dist/action-sheet/index.wxss similarity index 50% rename from dist/actionsheet/index.wxss rename to dist/action-sheet/index.wxss index c0189673..de0f424a 100644 --- a/dist/actionsheet/index.wxss +++ b/dist/action-sheet/index.wxss @@ -1 +1 @@ -.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom::after,.van-hairline--left::after,.van-hairline--right::after,.van-hairline--surround::after,.van-hairline--top-bottom::after,.van-hairline--top::after,.van-hairline::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}.van-actionsheet{color:#333;max-height:90%;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:#f8f8f8}.van-actionsheet--withtitle{background-color:#fff}.van-actionsheet__cancel,.van-actionsheet__item{height:50px;line-height:50px;font-size:16px;text-align:center;background-color:#fff}.van-actionsheet__cancel:active,.van-actionsheet__item:active{background-color:#e8e8e8}.van-actionsheet__item--disabled{color:#c9c9c9}.van-actionsheet__item--disabled:active{background-color:#fff}.van-actionsheet__subname{font-size:12px;color:#666;margin-left:5px}.van-actionsheet__loading{display:inline-block}.van-actionsheet__cancel{margin-top:10px}.van-actionsheet__header{font-size:16px;line-height:44px;text-align:center}.van-actionsheet__close{top:0;right:0;padding:0 15px;font-size:18px!important;color:#999;position:absolute!important;line-height:inherit!important} \ No newline at end of file +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom::after,.van-hairline--left::after,.van-hairline--right::after,.van-hairline--surround::after,.van-hairline--top-bottom::after,.van-hairline--top::after,.van-hairline::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}.van-action-sheet{color:#333;max-height:90%;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:#f8f8f8}.van-action-sheet--withtitle{background-color:#fff}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;line-height:50px;font-size:16px;text-align:center;background-color:#fff}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#e8e8e8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled:active{background-color:#fff}.van-action-sheet__subname{font-size:12px;color:#666;margin-left:5px}.van-action-sheet__loading{display:inline-block}.van-action-sheet__cancel{margin-top:10px}.van-action-sheet__header{font-size:16px;line-height:44px;text-align:center}.van-action-sheet__close{top:0;right:0;padding:0 15px;font-size:18px!important;color:#999;position:absolute!important;line-height:inherit!important} \ No newline at end of file diff --git a/dist/actionsheet/index.wxml b/dist/actionsheet/index.wxml deleted file mode 100644 index db4ce64d..00000000 --- a/dist/actionsheet/index.wxml +++ /dev/null @@ -1,38 +0,0 @@ - - - {{ title }} - - - - - - {{ item.name }} - {{ item.subname }} - - - - - - {{ cancelText }} - - - - - diff --git a/docs/markdown/changelog.md b/docs/markdown/changelog.md index a95a4574..e9ef8da8 100644 --- a/docs/markdown/changelog.md +++ b/docs/markdown/changelog.md @@ -78,7 +78,7 @@ **Improvements** -- 新增 Actionsheet 组件 +- 新增 ActionSheet 组件 - 新增 Badge 组件 - 新增 BadgeGroup 组件 - 新增 Button 组件 diff --git a/docs/src/Preview.vue b/docs/src/Preview.vue index d79fea36..36872fb4 100644 --- a/docs/src/Preview.vue +++ b/docs/src/Preview.vue @@ -14,7 +14,7 @@ const PREFIX = 'https://img.yzcdn.cn/vant-weapp/'; const MAP = { index: 'index-201808121630.png', - actionsheet: 'actionsheet-201808092138.jpeg', + 'action-sheet': 'actionsheet-201808092138.jpeg', badge: 'badge-201808092138.png', button: 'button-201808092138.png', card: 'card-201808092138.png', diff --git a/example/app.json b/example/app.json index 43f85ad5..588e5965 100644 --- a/example/app.json +++ b/example/app.json @@ -1,7 +1,7 @@ { "pages": [ "pages/dashboard/index", - "pages/actionsheet/index", + "pages/action-sheet/index", "pages/badge/index", "pages/button/index", "pages/card/index", diff --git a/example/config.js b/example/config.js index 5652101f..90e6418b 100644 --- a/example/config.js +++ b/example/config.js @@ -97,8 +97,8 @@ export default [ groupName: '操作反馈', list: [ { - path: '/actionsheet', - title: 'Actionsheet 上拉菜单' + path: '/action-sheet', + title: 'ActionSheet 上拉菜单' }, { path: '/dialog', diff --git a/example/pages/actionsheet/index.js b/example/pages/action-sheet/index.js similarity index 87% rename from example/pages/actionsheet/index.js rename to example/pages/action-sheet/index.js index b7a70d3d..6e29d3ab 100644 --- a/example/pages/actionsheet/index.js +++ b/example/pages/action-sheet/index.js @@ -25,15 +25,15 @@ Page({ }); }, - toggleActionsheet1() { + toggleActionSheet1() { this.toggle('show1'); }, - toggleActionsheet2() { + toggleActionSheet2() { this.toggle('show2'); }, - toggleActionsheet3() { + toggleActionSheet3() { this.toggle('show3'); } }); diff --git a/example/pages/actionsheet/index.json b/example/pages/action-sheet/index.json similarity index 53% rename from example/pages/actionsheet/index.json rename to example/pages/action-sheet/index.json index 5cd3456f..2fe4bc25 100644 --- a/example/pages/actionsheet/index.json +++ b/example/pages/action-sheet/index.json @@ -1,8 +1,8 @@ { - "navigationBarTitleText": "Actionsheet 上拉菜单", + "navigationBarTitleText": "ActionSheet 上拉菜单", "usingComponents": { "demo-block": "../../components/demo-block/index", - "van-actionsheet": "../../dist/actionsheet/index", + "van-action-sheet": "../../dist/action-sheet/index", "van-button": "../../dist/button/index" } } diff --git a/example/pages/action-sheet/index.wxml b/example/pages/action-sheet/index.wxml new file mode 100644 index 00000000..de37f520 --- /dev/null +++ b/example/pages/action-sheet/index.wxml @@ -0,0 +1,32 @@ + + 弹出 ActionSheet + + + + + 弹出带取消按钮的 ActionSheet + + + + + 弹出带标题的 ActionSheet + + 内容 + + diff --git a/example/pages/actionsheet/index.wxss b/example/pages/action-sheet/index.wxss similarity index 100% rename from example/pages/actionsheet/index.wxss rename to example/pages/action-sheet/index.wxss diff --git a/example/pages/actionsheet/index.wxml b/example/pages/actionsheet/index.wxml deleted file mode 100644 index 8082be60..00000000 --- a/example/pages/actionsheet/index.wxml +++ /dev/null @@ -1,32 +0,0 @@ - - 弹出 Actionsheet - - - - - 弹出带取消按钮的 Actionsheet - - - - - 弹出带标题的 Actionsheet - - 内容 - - diff --git a/packages/actionsheet/README.md b/packages/action-sheet/README.md similarity index 84% rename from packages/actionsheet/README.md rename to packages/action-sheet/README.md index 228b604b..1089b07d 100644 --- a/packages/actionsheet/README.md +++ b/packages/action-sheet/README.md @@ -1,10 +1,10 @@ -## Actionsheet 上拉菜单 +## ActionSheet 上拉菜单 ### 使用指南 在 index.json 中引入组件 ```json "usingComponents": { - "van-actionsheet": "path/to/vant-weapp/dist/actionsheet/index" + "van-action-sheet": "path/to/vant-weapp/dist/action-sheet/index" } ``` @@ -14,7 +14,7 @@ 需要传入一个`actions`的数组,数组的每一项是一个对象,对象属性见文档下方表格。 ```html - ``` -#### 带标题的 Actionsheet +#### 带标题的 ActionSheet -如果传入了`title`属性,且不为空,则另外一种样式的`Actionsheet`,里面内容需要自定义。 +如果传入了`title`属性,且不为空,则另外一种样式的`ActionSheet`,里面内容需要自定义。 ```html - + 一些内容 - + ``` ### API diff --git a/packages/actionsheet/index.js b/packages/action-sheet/index.js similarity index 100% rename from packages/actionsheet/index.js rename to packages/action-sheet/index.js diff --git a/packages/actionsheet/index.json b/packages/action-sheet/index.json similarity index 100% rename from packages/actionsheet/index.json rename to packages/action-sheet/index.json diff --git a/packages/actionsheet/index.pcss b/packages/action-sheet/index.pcss similarity index 98% rename from packages/actionsheet/index.pcss rename to packages/action-sheet/index.pcss index 2935132c..8e9069d2 100644 --- a/packages/actionsheet/index.pcss +++ b/packages/action-sheet/index.pcss @@ -1,7 +1,7 @@ @import '../common/style/var.pcss'; @import '../common/style/hairline.pcss'; -.van-actionsheet { +.van-action-sheet { color: $text-color; max-height: 90%; overflow-y: auto; diff --git a/packages/action-sheet/index.wxml b/packages/action-sheet/index.wxml new file mode 100644 index 00000000..61ca171c --- /dev/null +++ b/packages/action-sheet/index.wxml @@ -0,0 +1,38 @@ + + + {{ title }} + + + + + + {{ item.name }} + {{ item.subname }} + + + + + + {{ cancelText }} + + + + + diff --git a/packages/actionsheet/index.wxml b/packages/actionsheet/index.wxml deleted file mode 100644 index db4ce64d..00000000 --- a/packages/actionsheet/index.wxml +++ /dev/null @@ -1,38 +0,0 @@ - - - {{ title }} - - - - - - {{ item.name }} - {{ item.subname }} - - - - - - {{ cancelText }} - - - - -