From cbe9eb27d67ec6efe39435d01444f665f6663d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 9 Aug 2018 21:15:18 +0800 Subject: [PATCH] [Doc] temporary remove some components --- build/build-components.js | 2 +- build/webpack.dev.js | 9 +- dist/button/behaviors.js | 30 +-- dist/card/index.wxss | 2 +- dist/cell/index.wxss | 2 +- dist/checkbox-group/index.js | 29 --- dist/checkbox-group/index.json | 3 - dist/checkbox-group/index.wxml | 3 - dist/checkbox-group/index.wxss | 1 - dist/checkbox/index.js | 44 ---- dist/checkbox/index.json | 6 - dist/checkbox/index.wxml | 13 -- dist/checkbox/index.wxss | 1 - dist/common/helper.js | 102 --------- dist/datetime-picker/date-picker-view.wxml | 35 --- dist/datetime-picker/date-picker.js | 105 --------- dist/datetime-picker/index.js | 216 ------------------ dist/datetime-picker/index.json | 6 - dist/datetime-picker/index.wxml | 18 -- dist/datetime-picker/index.wxss | 53 ----- dist/datetime-picker/picker-view-column.wxml | 6 - dist/datetime-picker/utils.js | 124 ---------- dist/dialog/data.js | 26 --- dist/dialog/dialog.js | 104 --------- dist/dialog/index.js | 133 ----------- dist/dialog/index.json | 7 - dist/dialog/index.wxml | 40 ---- dist/dialog/index.wxss | 1 - dist/field/index.wxss | 2 +- dist/notice-bar/index.wxss | 2 +- dist/radio/index.js | 33 --- dist/radio/index.json | 6 - dist/radio/index.wxml | 28 --- dist/radio/index.wxss | 1 - dist/search/index.wxss | 2 +- dist/steps/index.js | 4 +- dist/steps/index.wxss | 2 +- dist/tab/index.js | 61 ----- dist/tab/index.json | 3 - dist/tab/index.wxml | 51 ----- dist/tab/index.wxss | 1 - dist/toast/index.js | 10 +- dist/toast/toast.js | 10 +- dist/toptips/index.js | 54 ----- dist/toptips/index.json | 3 - dist/toptips/index.wxml | 1 - dist/toptips/index.wxss | 1 - dist/toptips/toptips.js | 28 --- dist/tree-select/index.js | 24 +- docs/src/App.vue | 2 +- docs/src/Preview.vue | 37 +++ docs/src/doc.config.js | 24 -- docs/src/docs-entry.js | 6 - docs/src/preview.js | 7 + example/app.json | 12 +- example/pages/checkbox/index.js | 17 -- example/pages/checkbox/index.json | 9 - example/pages/checkbox/index.wxml | 41 ---- example/pages/checkbox/index.wxss | 4 - example/pages/common/index.js | 1 - example/pages/common/index.json | 6 - example/pages/common/index.wxml | 7 - example/pages/common/index.wxss | 14 -- example/pages/dashboard/config.js | 32 --- example/pages/datetime/index.js | 21 -- example/pages/datetime/index.json | 9 - example/pages/datetime/index.wxml | 55 ----- example/pages/datetime/index.wxss | 9 - example/pages/dialog/index.js | 140 ------------ example/pages/dialog/index.json | 8 - example/pages/dialog/index.wxml | 17 -- example/pages/radio/index.js | 19 -- example/pages/radio/index.json | 8 - example/pages/radio/index.wxml | 33 --- example/pages/radio/index.wxss | 8 - example/pages/tab/index.js | 57 ----- example/pages/tab/index.json | 6 - example/pages/tab/index.wxml | 22 -- example/pages/tab/index.wxss | 0 example/pages/toast/index.js | 59 ----- example/pages/toast/index.json | 7 - example/pages/toast/index.wxml | 34 --- example/pages/toptips/index.js | 44 ---- example/pages/toptips/index.json | 7 - example/pages/toptips/index.wxml | 25 -- package.json | 2 +- packages/checkbox-group/index.js | 26 --- packages/checkbox-group/index.json | 3 - packages/checkbox-group/index.pcss | 7 - packages/checkbox-group/index.wxml | 3 - packages/checkbox/README.md | 100 -------- packages/checkbox/index.js | 42 ---- packages/checkbox/index.json | 6 - packages/checkbox/index.pcss | 39 ---- packages/checkbox/index.wxml | 13 -- packages/datetime-picker/README.md | 49 ---- .../datetime-picker/date-picker-view.wxml | 35 --- packages/datetime-picker/date-picker.js | 97 -------- packages/datetime-picker/index.js | 181 --------------- packages/datetime-picker/index.json | 6 - packages/datetime-picker/index.wxml | 18 -- packages/datetime-picker/index.wxss | 53 ----- .../datetime-picker/picker-view-column.wxml | 6 - packages/datetime-picker/utils.js | 79 ------- packages/dialog/README.md | 138 ----------- packages/dialog/data.js | 24 -- packages/dialog/dialog.js | 98 -------- packages/dialog/index.js | 111 --------- packages/dialog/index.json | 7 - packages/dialog/index.pcss | 68 ------ packages/dialog/index.wxml | 40 ---- packages/index.js | 4 - packages/radio/README.md | 106 --------- packages/radio/index.js | 31 --- packages/radio/index.json | 6 - packages/radio/index.pcss | 79 ------- packages/radio/index.wxml | 28 --- packages/tab/README.md | 79 ------- packages/tab/index.js | 58 ----- packages/tab/index.json | 3 - packages/tab/index.pcss | 50 ---- packages/tab/index.wxml | 51 ----- packages/toptips/README.md | 128 ----------- packages/toptips/index.js | 50 ---- packages/toptips/index.json | 3 - packages/toptips/index.pcss | 24 -- packages/toptips/index.wxml | 1 - packages/toptips/toptips.js | 25 -- 128 files changed, 100 insertions(+), 4132 deletions(-) delete mode 100644 dist/checkbox-group/index.js delete mode 100644 dist/checkbox-group/index.json delete mode 100644 dist/checkbox-group/index.wxml delete mode 100644 dist/checkbox-group/index.wxss delete mode 100644 dist/checkbox/index.js delete mode 100644 dist/checkbox/index.json delete mode 100644 dist/checkbox/index.wxml delete mode 100644 dist/checkbox/index.wxss delete mode 100644 dist/common/helper.js delete mode 100644 dist/datetime-picker/date-picker-view.wxml delete mode 100644 dist/datetime-picker/date-picker.js delete mode 100644 dist/datetime-picker/index.js delete mode 100644 dist/datetime-picker/index.json delete mode 100644 dist/datetime-picker/index.wxml delete mode 100644 dist/datetime-picker/index.wxss delete mode 100644 dist/datetime-picker/picker-view-column.wxml delete mode 100644 dist/datetime-picker/utils.js delete mode 100644 dist/dialog/data.js delete mode 100644 dist/dialog/dialog.js delete mode 100644 dist/dialog/index.js delete mode 100644 dist/dialog/index.json delete mode 100644 dist/dialog/index.wxml delete mode 100644 dist/dialog/index.wxss delete mode 100644 dist/radio/index.js delete mode 100644 dist/radio/index.json delete mode 100644 dist/radio/index.wxml delete mode 100644 dist/radio/index.wxss delete mode 100644 dist/tab/index.js delete mode 100644 dist/tab/index.json delete mode 100644 dist/tab/index.wxml delete mode 100644 dist/tab/index.wxss delete mode 100644 dist/toptips/index.js delete mode 100644 dist/toptips/index.json delete mode 100644 dist/toptips/index.wxml delete mode 100644 dist/toptips/index.wxss delete mode 100644 dist/toptips/toptips.js create mode 100644 docs/src/Preview.vue create mode 100644 docs/src/preview.js delete mode 100644 example/pages/checkbox/index.js delete mode 100644 example/pages/checkbox/index.json delete mode 100644 example/pages/checkbox/index.wxml delete mode 100644 example/pages/checkbox/index.wxss delete mode 100644 example/pages/common/index.js delete mode 100644 example/pages/common/index.json delete mode 100644 example/pages/common/index.wxml delete mode 100644 example/pages/common/index.wxss delete mode 100644 example/pages/datetime/index.js delete mode 100644 example/pages/datetime/index.json delete mode 100644 example/pages/datetime/index.wxml delete mode 100644 example/pages/datetime/index.wxss delete mode 100644 example/pages/dialog/index.js delete mode 100644 example/pages/dialog/index.json delete mode 100644 example/pages/dialog/index.wxml delete mode 100644 example/pages/radio/index.js delete mode 100644 example/pages/radio/index.json delete mode 100644 example/pages/radio/index.wxml delete mode 100644 example/pages/radio/index.wxss delete mode 100644 example/pages/tab/index.js delete mode 100644 example/pages/tab/index.json delete mode 100644 example/pages/tab/index.wxml delete mode 100644 example/pages/tab/index.wxss delete mode 100644 example/pages/toast/index.js delete mode 100644 example/pages/toast/index.json delete mode 100644 example/pages/toast/index.wxml delete mode 100644 example/pages/toptips/index.js delete mode 100644 example/pages/toptips/index.json delete mode 100644 example/pages/toptips/index.wxml delete mode 100644 packages/checkbox-group/index.js delete mode 100644 packages/checkbox-group/index.json delete mode 100644 packages/checkbox-group/index.pcss delete mode 100644 packages/checkbox-group/index.wxml delete mode 100644 packages/checkbox/README.md delete mode 100644 packages/checkbox/index.js delete mode 100644 packages/checkbox/index.json delete mode 100644 packages/checkbox/index.pcss delete mode 100644 packages/checkbox/index.wxml delete mode 100644 packages/datetime-picker/README.md delete mode 100644 packages/datetime-picker/date-picker-view.wxml delete mode 100644 packages/datetime-picker/date-picker.js delete mode 100644 packages/datetime-picker/index.js delete mode 100644 packages/datetime-picker/index.json delete mode 100644 packages/datetime-picker/index.wxml delete mode 100644 packages/datetime-picker/index.wxss delete mode 100644 packages/datetime-picker/picker-view-column.wxml delete mode 100644 packages/datetime-picker/utils.js delete mode 100644 packages/dialog/README.md delete mode 100644 packages/dialog/data.js delete mode 100644 packages/dialog/dialog.js delete mode 100644 packages/dialog/index.js delete mode 100644 packages/dialog/index.json delete mode 100644 packages/dialog/index.pcss delete mode 100644 packages/dialog/index.wxml delete mode 100644 packages/radio/README.md delete mode 100644 packages/radio/index.js delete mode 100644 packages/radio/index.json delete mode 100644 packages/radio/index.pcss delete mode 100644 packages/radio/index.wxml delete mode 100644 packages/tab/README.md delete mode 100644 packages/tab/index.js delete mode 100644 packages/tab/index.json delete mode 100644 packages/tab/index.pcss delete mode 100644 packages/tab/index.wxml delete mode 100644 packages/toptips/README.md delete mode 100644 packages/toptips/index.js delete mode 100644 packages/toptips/index.json delete mode 100644 packages/toptips/index.pcss delete mode 100644 packages/toptips/index.wxml delete mode 100644 packages/toptips/toptips.js diff --git a/build/build-components.js b/build/build-components.js index 7e0fd05e..7dbcf8ed 100644 --- a/build/build-components.js +++ b/build/build-components.js @@ -1,5 +1,5 @@ const path = require('path'); -const extracter = require('./utils/extracter'); +const extracter = require('./extracter'); extracter({ src: path.resolve(__dirname, '../packages'), diff --git a/build/webpack.dev.js b/build/webpack.dev.js index c87dc20b..02c5d964 100644 --- a/build/webpack.dev.js +++ b/build/webpack.dev.js @@ -6,7 +6,8 @@ const { VueLoaderPlugin } = require('vue-loader'); module.exports = { mode: 'development', entry: { - 'vant-docs': './docs/src/index.js' + 'vant-docs': './docs/src/index.js', + 'vant-preview': './docs/src/preview.js' }, output: { path: path.join(__dirname, '../docs/dist'), @@ -82,6 +83,12 @@ module.exports = { template: 'docs/src/index.tpl', filename: 'index.html', inject: true + }), + new HtmlWebpackPlugin({ + chunks: ['vant-preview'], + template: 'docs/src/index.tpl', + filename: 'preview.html', + inject: true }) ] }; diff --git a/dist/button/behaviors.js b/dist/button/behaviors.js index 903e7bf2..b0e8bf3b 100644 --- a/dist/button/behaviors.js +++ b/dist/button/behaviors.js @@ -37,39 +37,29 @@ module.exports = Behavior({ methods: { bindgetuserinfo: function bindgetuserinfo() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$detail = _ref.detail, - detail = _ref$detail === undefined ? {} : _ref$detail; + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.triggerEvent('getuserinfo', detail); + this.triggerEvent('getuserinfo', event.detail || {}); }, bindcontact: function bindcontact() { - var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref2$detail = _ref2.detail, - detail = _ref2$detail === undefined ? {} : _ref2$detail; + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.triggerEvent('contact', detail); + this.triggerEvent('contact', event.detail || {}); }, bindgetphonenumber: function bindgetphonenumber() { - var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref3$detail = _ref3.detail, - detail = _ref3$detail === undefined ? {} : _ref3$detail; + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.triggerEvent('getphonenumber', detail); + this.triggerEvent('getphonenumber', event.detail || {}); }, bindopensetting: function bindopensetting() { - var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref4$detail = _ref4.detail, - detail = _ref4$detail === undefined ? {} : _ref4$detail; + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.triggerEvent('opensetting', detail); + this.triggerEvent('opensetting', event.detail || {}); }, binderror: function binderror() { - var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref5$detail = _ref5.detail, - detail = _ref5$detail === undefined ? {} : _ref5$detail; + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.triggerEvent('error', detail); + this.triggerEvent('error', event.detail || {}); } } }); \ No newline at end of file diff --git a/dist/card/index.wxss b/dist/card/index.wxss index 33980063..7e5e97b7 100644 --- a/dist/card/index.wxss +++ b/dist/card/index.wxss @@ -1 +1 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-clearfix::after{content:'';display:table;clear:both}.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}@-webkit-keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in;animation:.3s van-fade-in}.van-fade-leave-active{-webkit-animation:.3s van-fade-out;animation:.3s van-fade-out}.van-slide-bottom-enter-active{-webkit-animation:van-slide-bottom-enter .3s both ease;animation:van-slide-bottom-enter .3s both ease}.van-slide-bottom-leave-active{-webkit-animation:van-slide-bottom-leave .3s both ease;animation:van-slide-bottom-leave .3s both ease}.van-card{color:#333;height:100px;font-size:16px;background:#fafafa;position:relative;box-sizing:border-box;padding:5px 15px 5px 115px}.van-card--center,.van-card__thumb{-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.van-card__thumb{top:5px;left:15px;width:90px;height:90px;position:absolute}.van-card__img{border:none;max-width:100%;max-height:100%}.van-card,.van-card__row,.van-card__thumb{display:-webkit-box;display:flex}.van-card__content{width:100%}.van-card__content--center{height:90px;-webkit-box-align:center;align-items:center}.van-card__desc,.van-card__title{line-height:20px;word-break:break-all}.van-card__title{max-height:40px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-card__desc{color:#666;font-size:12px;max-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-card__num,.van-card__price{-webkit-box-flex:1;flex:1;min-width:80px;line-height:20px;text-align:right}.van-card__price{font-size:14px}.van-card__num{color:#666;font-size:12px}.van-card__footer{right:15px;bottom:5px;position:absolute}.van-card__footer .van-button{margin-left:5px} \ No newline at end of file +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-clearfix::after{content:'';display:table;clear:both}.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}@-webkit-keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in;animation:.3s van-fade-in}.van-fade-leave-active{-webkit-animation:.3s van-fade-out;animation:.3s van-fade-out}.van-slide-bottom-enter-active{-webkit-animation:van-slide-bottom-enter .3s both ease;animation:van-slide-bottom-enter .3s both ease}.van-slide-bottom-leave-active{-webkit-animation:van-slide-bottom-leave .3s both ease;animation:van-slide-bottom-leave .3s both ease}.van-card{color:#333;height:100px;font-size:16px;background:#fafafa;position:relative;box-sizing:border-box;padding:5px 15px 5px 115px}.van-card--center,.van-card__thumb{-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{top:5px;left:15px;width:90px;height:90px;position:absolute}.van-card__img{border:none;max-width:100%;max-height:100%}.van-card,.van-card__row,.van-card__thumb{display:-webkit-box;display:-webkit-flex;display:flex}.van-card__content{width:100%}.van-card__content--center{height:90px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-card__desc,.van-card__title{line-height:20px;word-break:break-all}.van-card__title{max-height:40px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-card__desc{color:#666;font-size:12px;max-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-card__num,.van-card__price{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:80px;line-height:20px;text-align:right}.van-card__price{font-size:14px}.van-card__num{color:#666;font-size:12px}.van-card__footer{right:15px;bottom:5px;position:absolute}.van-card__footer .van-button{margin-left:5px} \ No newline at end of file diff --git a/dist/cell/index.wxss b/dist/cell/index.wxss index 418b61c1..c382a7fa 100644 --- a/dist/cell/index.wxss +++ b/dist/cell/index.wxss @@ -1 +1 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-clearfix::after{content:'';display:table;clear:both}.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}@-webkit-keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in;animation:.3s van-fade-in}.van-fade-leave-active{-webkit-animation:.3s van-fade-out;animation:.3s van-fade-out}.van-slide-bottom-enter-active{-webkit-animation:van-slide-bottom-enter .3s both ease;animation:van-slide-bottom-enter .3s both ease}.van-slide-bottom-leave-active{-webkit-animation:van-slide-bottom-leave .3s both ease;animation:van-slide-bottom-leave .3s both ease}.van-cell{width:100%;display:-webkit-box;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{left:15px;right:0;width:auto;-webkit-transform:scale(1,.5);transform:scale(1,.5);border-bottom-width:1px}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-box-flex:1;flex:1}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon{font-size:16px;line-height:24px;margin-right:5px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px;line-height:24px;margin-left:5px}.van-cell__right-icon--left::before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-cell__right-icon--up::before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-cell__right-icon--down::before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-cell--tapable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-box-align:center;align-items:center} \ No newline at end of file +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-clearfix::after{content:'';display:table;clear:both}.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}@-webkit-keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in;animation:.3s van-fade-in}.van-fade-leave-active{-webkit-animation:.3s van-fade-out;animation:.3s van-fade-out}.van-slide-bottom-enter-active{-webkit-animation:van-slide-bottom-enter .3s both ease;animation:van-slide-bottom-enter .3s both ease}.van-slide-bottom-leave-active{-webkit-animation:van-slide-bottom-leave .3s both ease;animation:van-slide-bottom-leave .3s both ease}.van-cell{width:100%;display:-webkit-box;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{left:15px;right:0;width:auto;-webkit-transform:scale(1,.5);transform:scale(1,.5);border-bottom-width:1px}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon{font-size:16px;line-height:24px;margin-right:5px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px;line-height:24px;margin-left:5px}.van-cell__right-icon--left::before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-cell__right-icon--up::before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-cell__right-icon--down::before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-cell--tapable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center} \ No newline at end of file diff --git a/dist/checkbox-group/index.js b/dist/checkbox-group/index.js deleted file mode 100644 index 09058960..00000000 --- a/dist/checkbox-group/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var _relations; - -var CHECKBOX_PATH = '../checkbox/index'; - -Component({ - relations: (_relations = {}, _relations[CHECKBOX_PATH] = { - type: 'child', - linked: function linked() { - this.updateChildren(CHECKBOX_PATH); - } - }, _relations), - - data: { - elementUpdateTimeout: 0 - }, - - methods: { - updateChildren: function updateChildren(childPath) { - // 把checkbox标记为在group中,设置不同样式 - var elements = this.getRelationNodes(childPath); - - elements.forEach(function (checkbox, index) { - checkbox.updateData({ isInGroup: true }); - }); - } - } -}); \ No newline at end of file diff --git a/dist/checkbox-group/index.json b/dist/checkbox-group/index.json deleted file mode 100644 index 32640e0d..00000000 --- a/dist/checkbox-group/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "component": true -} \ No newline at end of file diff --git a/dist/checkbox-group/index.wxml b/dist/checkbox-group/index.wxml deleted file mode 100644 index a6ef51f8..00000000 --- a/dist/checkbox-group/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dist/checkbox-group/index.wxss b/dist/checkbox-group/index.wxss deleted file mode 100644 index 418d8711..00000000 --- a/dist/checkbox-group/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.checkbox-group{padding-bottom:10px;background-color:#fff}.checkbox-group .van-checkbox{margin-top:10px} \ No newline at end of file diff --git a/dist/checkbox/index.js b/dist/checkbox/index.js deleted file mode 100644 index 62160c07..00000000 --- a/dist/checkbox/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var _relations; - -var CHECKBOX_GROUP_PATH = '../checkbox-group/index'; - -Component({ - externalClasses: ['checkbox-class'], - relations: (_relations = {}, _relations[CHECKBOX_GROUP_PATH] = { - type: 'parent' - }, _relations), - - properties: { - checked: Boolean, - disabled: Boolean, - isInGroup: Boolean, - labelDisabled: Boolean, - type: String - }, - - data: function data() { - return { - isInGroup: false, - isInCell: false - }; - }, - - - methods: { - handleClick: function handleClick() { - if (this.data.disabled) { - return; - } - - var checked = !this.data.checked; - - this.triggerEvent('change', checked); - this.setData({ checked: checked }); - }, - updateData: function updateData(data) { - this.setData(data); - } - } -}); \ No newline at end of file diff --git a/dist/checkbox/index.json b/dist/checkbox/index.json deleted file mode 100644 index 0a336c08..00000000 --- a/dist/checkbox/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "van-icon": "../icon/index" - } -} diff --git a/dist/checkbox/index.wxml b/dist/checkbox/index.wxml deleted file mode 100644 index 311ccbb9..00000000 --- a/dist/checkbox/index.wxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/dist/checkbox/index.wxss b/dist/checkbox/index.wxss deleted file mode 100644 index b56cf0a8..00000000 --- a/dist/checkbox/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-checkbox{display:inline-block;padding:0 10px;font-size:14px}.van-checkbox__item{display:block;margin-top:10px}.van-checkbox__list-item{display:block;padding:10px 10px 10px 0;margin-left:10px;border-bottom:1px solid #e5e5e5}.van-checkbox__list-item .van-checkbox__icon{float:right}.van-checkbox__icon{display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;color:#aaa}.van-checkbox__icon.van-checkbox--checked{color:#06bf04}.van-checkbox__icon.van-checkbox--disabled{color:#e5e5e5}.van-checkbox__label{display:inline-block;margin-left:10px} \ No newline at end of file diff --git a/dist/common/helper.js b/dist/common/helper.js deleted file mode 100644 index e995325d..00000000 --- a/dist/common/helper.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -// 从事件对象中解析得到 componentId -// 需要在元素上声明 data-component-id -function extractComponentId() { - var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var _ref = event.currentTarget || {}, - componentId = _ref.dataset.componentId; - - return componentId; -} - -/* - 注:默认合并所有生命周期函数 - 配置合并指定的生命周期 or 忽略指定字段 - const extend = extendCreator({ - life: ['onLoad', 'onPullDownRefresh'], - exclude: ['binder'] - }); - - Page(extend({}, { - onLoad() {}, - ... - })); -*/ - -var LIFE_CYCLE = ['onLoad', 'onReady', 'onShow', 'onHide', 'onUnload', 'onPullDownRefresh', 'onReachBottom', 'onShareAppMessage', 'onPageScroll']; - -var extendCreator = function extendCreator() { - var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var _config$life = config.life, - life = _config$life === undefined ? LIFE_CYCLE : _config$life, - _config$exclude = config.exclude, - exclude = _config$exclude === undefined ? [] : _config$exclude; - - - var excludeList = exclude.concat(LIFE_CYCLE.map(getFuncArrayName)); - - if (!Array.isArray(life) || !Array.isArray(exclude)) throw new Error('Invalid Extend Config'); - var lifeCycleList = life.filter(function (item) { - return LIFE_CYCLE.indexOf(item) >= 0; - }); - return function extend(target) { - for (var _len = arguments.length, objList = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - objList[_key - 1] = arguments[_key]; - } - - objList.forEach(function (source) { - if (source) { - var keys = Object.keys(source); - keys.forEach(function (key) { - var value = source[key]; - if (excludeList.indexOf(key) >= 0) return; - if (lifeCycleList.indexOf(key) >= 0 && typeof value === 'function') { - var funcArrayName = getFuncArrayName(key); - if (!target[funcArrayName]) { - target[funcArrayName] = []; - if (target[key]) { - target[funcArrayName].push(target[key]); - } - target[key] = function () { - var _this = this; - - for (var _len2 = arguments.length, rest = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - rest[_key2] = arguments[_key2]; - } - - target[funcArrayName].forEach(function (func) { - return func.apply(_this, rest); - }); - }; - } - - if (source[funcArrayName]) { - var _target$funcArrayName; - - // 经过生命周期合并的组件直接整合函数列表 - (_target$funcArrayName = target[funcArrayName]).push.apply(_target$funcArrayName, source[funcArrayName]); - } else { - // 添加生命周期函数进入函数列表 - target[funcArrayName].push(value); - } - } else { - target[key] = value; - } - }); - } - }); - return target; - }; -}; - -var getFuncArrayName = function getFuncArrayName(name) { - return '__$' + name; -}; - -module.exports = { - extractComponentId: extractComponentId, - extend: Object.assign, - extendCreator: extendCreator -}; \ No newline at end of file diff --git a/dist/datetime-picker/date-picker-view.wxml b/dist/datetime-picker/date-picker-view.wxml deleted file mode 100644 index 0a69f841..00000000 --- a/dist/datetime-picker/date-picker-view.wxml +++ /dev/null @@ -1,35 +0,0 @@ - - -