diff --git a/dist/behaviors/button.js b/dist/behaviors/button.js deleted file mode 100644 index 82ee5675..00000000 --- a/dist/behaviors/button.js +++ /dev/null @@ -1,57 +0,0 @@ -export default Behavior({ - properties: { - loading: Boolean, - // 在自定义组件中,无法与外界的 form 组件联动,暂时不开放 - // formType: String, - openType: String, - appParameter: String, - // 暂时不开放,直接传入无法设置样式 - // hoverClass: { - // type: String, - // value: 'button-hover' - // }, - hoverStopPropagation: Boolean, - hoverStartTime: { - type: Number, - value: 20 - }, - hoverStayTime: { - type: Number, - value: 70 - }, - lang: { - type: String, - value: 'en' - }, - sessionFrom: { - type: String, - value: '' - }, - sendMessageTitle: String, - sendMessagePath: String, - sendMessageImg: String, - showMessageCard: String - }, - - methods: { - bindgetuserinfo(event = {}) { - this.triggerEvent('getuserinfo', event.detail || {}); - }, - - bindcontact(event = {}) { - this.triggerEvent('contact', event.detail || {}); - }, - - bindgetphonenumber(event = {}) { - this.triggerEvent('getphonenumber', event.detail || {}); - }, - - bindopensetting(event = {}) { - this.triggerEvent('opensetting', event.detail || {}); - }, - - binderror(event = {}) { - this.triggerEvent('error', event.detail || {}); - } - } -}); diff --git a/dist/behaviors/touch.js b/dist/behaviors/touch.js deleted file mode 100644 index 19ce84a2..00000000 --- a/dist/behaviors/touch.js +++ /dev/null @@ -1,22 +0,0 @@ -export default Behavior({ - methods: { - touchStart(event) { - this.direction = ''; - this.deltaX = 0; - this.deltaY = 0; - this.offsetX = 0; - this.offsetY = 0; - this.startX = event.touches[0].clientX; - this.startY = event.touches[0].clientY; - }, - - touchMove(event) { - const touch = event.touches[0]; - this.deltaX = touch.clientX - this.startX; - this.deltaY = touch.clientY - this.startY; - this.offsetX = Math.abs(this.deltaX); - this.offsetY = Math.abs(this.deltaY); - this.direction = this.offsetX > this.offsetY ? 'horizontal' : this.offsetX < this.offsetY ? 'vertical' : ''; - } - } -}); diff --git a/dist/behaviors/transition.js b/dist/behaviors/transition.js deleted file mode 100644 index 5fca3ab4..00000000 --- a/dist/behaviors/transition.js +++ /dev/null @@ -1,54 +0,0 @@ -export default function(showDefaultValue) { - return Behavior({ - properties: { - customStyle: String, - show: { - value: showDefaultValue, - type: Boolean, - observer(value) { - if (value) { - this.show(); - } else { - this.setData({ - type: 'leave' - }); - } - } - }, - duration: { - type: Number, - value: 300 - } - }, - - data: { - type: '', - inited: false, - display: false - }, - - attached() { - if (this.data.show) { - this.show(); - } - }, - - methods: { - show() { - this.setData({ - inited: true, - display: true, - type: 'enter' - }); - }, - - onAnimationEnd() { - if (!this.data.show) { - this.setData({ - display: false - }); - } - } - } - }); -} diff --git a/dist/common/classnames.js b/dist/common/classnames.js deleted file mode 100644 index 12904405..00000000 --- a/dist/common/classnames.js +++ /dev/null @@ -1,29 +0,0 @@ -const hasOwn = {}.hasOwnProperty; - -export default function classNames() { - const classes = []; - - for (let i = 0; i < arguments.length; i++) { - const arg = arguments[i]; - if (!arg) continue; - - const argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg) && arg.length) { - const inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } else if (argType === 'object') { - for (const key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); -}; diff --git a/dist/common/index.wxss b/dist/common/index.wxss deleted file mode 100644 index a042020a..00000000 --- a/dist/common/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.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} \ No newline at end of file diff --git a/dist/utils/index.js b/dist/utils/index.js deleted file mode 100644 index 71ddfc64..00000000 --- a/dist/utils/index.js +++ /dev/null @@ -1,13 +0,0 @@ -function isDef(value) { - return value !== undefined && value !== null; -} - -function isObj(x) { - const type = typeof x; - return x !== null && (type === 'object' || type === 'function'); -} - -export { - isObj, - isDef -}; diff --git a/package.json b/package.json index 3ff1f92a..1c17d286 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev": "node build/dev.js", "lint": "eslint ./packages --ext .js", "release": "sh build/release.sh", - "build:lib": "NODE_ENV=production node build/compiler.js", + "build:lib": "rm -rf dist && NODE_ENV=production node build/compiler.js", "build:site": "rm -rf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.prd.js && gh-pages -d docs/dist", "build:changelog": "vant-doc changelog --tag v0.2.0 ./docs/markdown/changelog.generated.md" },