From c5d66755b0a184b7ee0144d1be226e748d333aad Mon Sep 17 00:00:00 2001 From: rex-zsd Date: Sat, 23 Mar 2019 00:23:48 +0800 Subject: [PATCH] [build] 0.5.8 --- dist/action-sheet/index.wxml | 2 +- dist/action-sheet/index.wxss | 2 +- dist/badge/index.wxss | 2 +- dist/button/index.wxss | 2 +- dist/card/index.wxss | 2 +- dist/cell-group/index.js | 1 + dist/cell-group/index.wxml | 6 +++ dist/cell-group/index.wxss | 2 +- dist/cell/index.wxss | 2 +- dist/collapse-item/index.js | 2 +- dist/collapse-item/index.wxml | 2 +- dist/collapse/index.js | 6 ++- dist/collapse/index.wxml | 2 +- dist/collapse/index.wxss | 1 + dist/common/index.wxss | 2 +- dist/common/style/clearfix.wxss | 2 +- dist/common/style/ellipsis.wxss | 2 +- dist/common/style/hairline.wxss | 2 +- dist/field/index.wxss | 2 +- dist/goods-action-button/index.wxml | 2 + dist/goods-action-icon/index.js | 4 +- dist/goods-action-icon/index.wxml | 2 + dist/icon/index.wxml | 1 + dist/icon/index.wxss | 2 +- dist/info/index.wxml | 4 +- dist/info/index.wxss | 2 +- dist/loading/index.wxss | 2 +- dist/mixins/transition.js | 45 ++++++++++++---------- dist/nav-bar/index.wxss | 2 +- dist/picker-column/index.js | 2 +- dist/picker/index.wxss | 2 +- dist/popup/index.js | 3 ++ dist/rate/index.wxss | 2 +- dist/row/index.wxss | 2 +- dist/search/index.js | 9 ++++- dist/search/index.wxml | 58 ++++++++++++++++------------- dist/search/index.wxss | 2 +- dist/slider/index.wxss | 2 +- dist/stepper/index.js | 20 ++++------ dist/stepper/index.wxml | 28 +++++++------- dist/stepper/index.wxss | 2 +- dist/steps/index.wxss | 2 +- dist/swipe-cell/index.wxml | 8 ++-- dist/switch/index.wxss | 2 +- dist/tabbar-item/index.wxss | 2 +- dist/tabs/index.wxss | 2 +- dist/tag/index.wxss | 2 +- dist/toast/index.wxss | 2 +- dist/tree-select/index.wxss | 2 +- 49 files changed, 149 insertions(+), 115 deletions(-) create mode 100644 dist/collapse/index.wxss diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml index 2c4c1f21..5f6d33f8 100644 --- a/dist/action-sheet/index.wxml +++ b/dist/action-sheet/index.wxml @@ -36,6 +36,7 @@ + {{ cancelText }} - diff --git a/dist/action-sheet/index.wxss b/dist/action-sheet/index.wxss index decb8aa9..a3087b1b 100644 --- a/dist/action-sheet/index.wxss +++ b/dist/action-sheet/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#e8e8e8}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;height:10px;background-color:#f8f8f8;content:' '}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} \ No newline at end of file +@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel:before{display:block;height:10px;background-color:#f8f8f8;content:" "}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} \ No newline at end of file diff --git a/dist/badge/index.wxss b/dist/badge/index.wxss index 71545d99..73cb2c1e 100644 --- a/dist/badge/index.wxss +++ b/dist/badge/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#e8e8e8}.van-badge::after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active::after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative} \ No newline at end of file +@import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#f2f3f5}.van-badge:after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active:after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative} \ No newline at end of file diff --git a/dist/button/index.wxss b/dist/button/index.wxss index 17fa85bd..215f7f37 100644 --- a/dist/button/index.wxss +++ b/dist/button/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;-webkit-text-size-adjust:100%;vertical-align:middle;border-radius:2px;box-sizing:border-box;-webkit-appearance:none}.van-button::after{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:' ';opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button--active::after{opacity:.15}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle} \ No newline at end of file +@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;-webkit-text-size-adjust:100%;vertical-align:middle;border-radius:2px;box-sizing:border-box;-webkit-appearance:none}.van-button:after{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button--active:after{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle} \ No newline at end of file diff --git a/dist/card/index.wxss b/dist/card/index.wxss index b2b0a76f..6a749258 100644 --- a/dist/card/index.wxss +++ b/dist/card/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{line-height:20px;color:#7d7e80}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none} \ No newline at end of file +@import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{color:#7d7e80}.van-card__bottom,.van-card__desc{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none} \ No newline at end of file diff --git a/dist/cell-group/index.js b/dist/cell-group/index.js index 8e42c191..3611e097 100644 --- a/dist/cell-group/index.js +++ b/dist/cell-group/index.js @@ -1,6 +1,7 @@ import { VantComponent } from '../common/component'; VantComponent({ props: { + title: String, border: { type: Boolean, value: true diff --git a/dist/cell-group/index.wxml b/dist/cell-group/index.wxml index 4ed34ace..6e0b471d 100644 --- a/dist/cell-group/index.wxml +++ b/dist/cell-group/index.wxml @@ -1,3 +1,9 @@ + + {{ title }} + diff --git a/dist/cell-group/index.wxss b/dist/cell-group/index.wxss index 99694d60..e0fc603d 100644 --- a/dist/cell-group/index.wxss +++ b/dist/cell-group/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss'; \ No newline at end of file +@import '../common/index.wxss';.van-cell-group__title{font-size:14px;padding:15px 15px 5px;color:#999;line-height:16px} \ No newline at end of file diff --git a/dist/cell/index.wxss b/dist/cell/index.wxss index 17966301..a476af17 100644 --- a/dist/cell/index.wxss +++ b/dist/cell/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless::after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:7px;font-size:14px;color:#f44;content:'*'}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px} \ No newline at end of file +@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:7px;font-size:14px;color:#f44;content:"*"}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px} \ No newline at end of file diff --git a/dist/collapse-item/index.js b/dist/collapse-item/index.js index 6b5d7912..d8e9b0bf 100644 --- a/dist/collapse-item/index.js +++ b/dist/collapse-item/index.js @@ -49,7 +49,7 @@ VantComponent({ if (expanded !== this.data.expanded) { this.updateStyle(expanded); } - this.set({ expanded }); + this.set({ index, expanded }); }, updateStyle(expanded) { this.getRect('.van-collapse-item__content').then(res => { diff --git a/dist/collapse-item/index.wxml b/dist/collapse-item/index.wxml index 4c52f6ca..b39e4cea 100644 --- a/dist/collapse-item/index.wxml +++ b/dist/collapse-item/index.wxml @@ -1,6 +1,6 @@ - + + diff --git a/dist/collapse/index.wxss b/dist/collapse/index.wxss new file mode 100644 index 00000000..99694d60 --- /dev/null +++ b/dist/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/dist/common/index.wxss b/dist/common/index.wxss index 474d28b9..1b5b4ee2 100644 --- a/dist/common/index.wxss +++ b/dist/common/index.wxss @@ -1 +1 @@ -.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;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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 +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.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;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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/common/style/clearfix.wxss b/dist/common/style/clearfix.wxss index df65a0a4..8d6328c2 100644 --- a/dist/common/style/clearfix.wxss +++ b/dist/common/style/clearfix.wxss @@ -1 +1 @@ -.van-clearfix::after{content:'';display:table;clear:both} \ No newline at end of file +.van-clearfix:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/dist/common/style/ellipsis.wxss b/dist/common/style/ellipsis.wxss index 94eba8e2..a829a98f 100644 --- a/dist/common/style/ellipsis.wxss +++ b/dist/common/style/ellipsis.wxss @@ -1 +1 @@ -.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} \ No newline at end of file +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/dist/common/style/hairline.wxss b/dist/common/style/hairline.wxss index 0988a6ad..53508ad9 100644 --- a/dist/common/style/hairline.wxss +++ b/dist/common/style/hairline.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;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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 +.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;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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/field/index.wxss b/dist/field/index.wxss index 6948b04c..4853be90 100644 --- a/dist/field/index.wxss +++ b/dist/field/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:transparent;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:transparent;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__input--error{color:#f44}.van-field__placeholder{color:#999}.van-field__clear-root{display:-webkit-flex;display:flex;height:24px;-webkit-align-items:center;align-items:center}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__clear{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon{display:block!important}.van-field__button{padding-left:10px}.van-field__error-message{font-size:12px;color:#f44;text-align:left} \ No newline at end of file +@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__input--error{color:#f44}.van-field__placeholder{color:#999}.van-field__clear-root{display:-webkit-flex;display:flex;height:24px;-webkit-align-items:center;align-items:center}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__clear{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon{display:block!important}.van-field__button{padding-left:10px}.van-field__error-message{font-size:12px;color:#f44;text-align:left} \ No newline at end of file diff --git a/dist/goods-action-button/index.wxml b/dist/goods-action-button/index.wxml index 4dba959a..39296d59 100644 --- a/dist/goods-action-button/index.wxml +++ b/dist/goods-action-button/index.wxml @@ -8,6 +8,7 @@ disabled="{{ disabled }}" open-type="{{ openType }}" custom-class="custom-class" + business-id="{{ businessId }}" session-from="{{ sessionFrom }}" app-parameter="{{ appParameter }}" send-message-img="{{ sendMessageImg }}" @@ -20,6 +21,7 @@ bindopensetting="bindOpenSetting" bindgetuserinfo="bindGetUserInfo" bindgetphonenumber="bindGetPhoneNumber" + bindlaunchapp="bindLaunchApp" > {{ text }} diff --git a/dist/goods-action-icon/index.js b/dist/goods-action-icon/index.js index 8599f765..7b3af049 100644 --- a/dist/goods-action-icon/index.js +++ b/dist/goods-action-icon/index.js @@ -8,7 +8,9 @@ VantComponent({ props: { text: String, info: String, - icon: String + icon: String, + disabled: Boolean, + loading: Boolean }, methods: { onClick(event) { diff --git a/dist/goods-action-icon/index.wxml b/dist/goods-action-icon/index.wxml index 9593ac88..40c0773d 100644 --- a/dist/goods-action-icon/index.wxml +++ b/dist/goods-action-icon/index.wxml @@ -6,6 +6,7 @@ loading="{{ loading }}" disabled="{{ disabled }}" open-type="{{ openType }}" + business-id="{{ businessId }}" custom-class="van-goods-action-icon" session-from="{{ sessionFrom }}" app-parameter="{{ appParameter }}" @@ -19,6 +20,7 @@ bindopensetting="bindOpenSetting" bindgetuserinfo="bindGetUserInfo" bindgetphonenumber="bindGetPhoneNumber" + bindlaunchapp="bindLaunchApp" > - {{ info }} - +>{{ info }} diff --git a/dist/info/index.wxss b/dist/info/index.wxss index fda67e87..f9c10d0c 100644 --- a/dist/info/index.wxss +++ b/dist/info/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-info{position:absolute;right:0;top:-8px;color:#fff;font-size:12px;font-weight:500;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;text-align:center;box-sizing:border-box;padding:0 3px;min-width:16px;line-height:14px;border:1px solid #fff;border-radius:16px;background-color:#f44;-webkit-transform:translateX(50%);transform:translateX(50%);-webkit-transform-origin:100%;transform-origin:100%} \ No newline at end of file +@import '../common/index.wxss';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%} \ No newline at end of file diff --git a/dist/loading/index.wxss b/dist/loading/index.wxss index a4b3fd12..58cb52ae 100644 --- a/dist/loading/index.wxss +++ b/dist/loading/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-loading{z-index:0;line-height:0;position:relative;display:inline-block;vertical-align:middle}.van-loading__spinner{z-index:-1;width:100%;height:100%;position:relative;display:inline-block;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid;border-radius:100%;border-color:transparent;border-top-color:currentColor}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot::before{width:2px;height:25%;content:' ';display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:nth-of-type(1){opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(360deg);transform:rotate(360deg)}@-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)}} \ No newline at end of file +@import '../common/index.wxss';.van-loading{z-index:0;line-height:0;vertical-align:middle}.van-loading,.van-loading__spinner{position:relative;display:inline-block}.van-loading__spinner{z-index:-1;width:100%;height:100%;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border-radius:100%;border:1px solid transparent;border-top-color:initial}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot:before{width:2px;height:25%;content:" ";display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:first-of-type{opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(1turn);transform:rotate(1turn)}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/dist/mixins/transition.js b/dist/mixins/transition.js index 2705752d..01058d4a 100644 --- a/dist/mixins/transition.js +++ b/dist/mixins/transition.js @@ -5,7 +5,7 @@ const getClassNames = (name) => ({ leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`, 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class` }); -const requestAnimationFrame = (cb) => setTimeout(cb, 1000 / 60); +const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30)); export const transition = function (showDefaultValue) { return Behavior({ properties: { @@ -53,35 +53,42 @@ export const transition = function (showDefaultValue) { }, show() { const { classNames, duration } = this.data; - this.set({ + const currentDuration = isObj(duration) ? duration.leave : duration; + Promise.resolve() + .then(nextTick) + .then(() => this.set({ inited: true, display: true, classes: classNames.enter, - currentDuration: isObj(duration) ? duration.enter : duration - }).then(() => { - requestAnimationFrame(() => { - this.set({ - classes: classNames['enter-to'] - }); - }); - }); + currentDuration + })) + .then(nextTick) + .then(() => this.set({ + classes: classNames['enter-to'] + })); }, leave() { const { classNames, duration } = this.data; - this.set({ + const currentDuration = isObj(duration) ? duration.leave : duration; + if (+currentDuration === 0) { + this.onTransitionEnd(); + return; + } + Promise.resolve() + .then(nextTick) + .then(() => this.set({ classes: classNames.leave, - currentDuration: isObj(duration) ? duration.leave : duration - }).then(() => { - requestAnimationFrame(() => { - this.set({ - classes: classNames['leave-to'] - }); - }); - }); + currentDuration + })) + .then(nextTick) + .then(() => this.set({ + classes: classNames['leave-to'] + })); }, onTransitionEnd() { if (!this.data.show) { this.set({ display: false }); + this.$emit('transitionEnd'); } } } diff --git a/dist/nav-bar/index.wxss b/dist/nav-bar/index.wxss index 51d090eb..147d2fa4 100644 --- a/dist/nav-bar/index.wxss +++ b/dist/nav-bar/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-nav-bar{position:relative;height:46px;line-height:46px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#e8e8e8}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px} \ No newline at end of file +@import '../common/index.wxss';.van-nav-bar{position:relative;height:46px;line-height:46px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px} \ No newline at end of file diff --git a/dist/picker-column/index.js b/dist/picker-column/index.js index b763c567..fbe52935 100644 --- a/dist/picker-column/index.js +++ b/dist/picker-column/index.js @@ -25,7 +25,7 @@ VantComponent({ options: [], currentIndex: 0 }, - beforeCreate() { + created() { const { defaultIndex, initialOptions } = this.data; this.set({ currentIndex: defaultIndex, diff --git a/dist/picker/index.wxss b/dist/picker/index.wxss index 22c454bd..a054f3c5 100644 --- a/dist/picker/index.wxss +++ b/dist/picker/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:rgba(255,255,255,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)} \ No newline at end of file +@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:hsla(0,0%,100%,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)} \ No newline at end of file diff --git a/dist/popup/index.js b/dist/popup/index.js index 67c7d6fd..837dc9f8 100644 --- a/dist/popup/index.js +++ b/dist/popup/index.js @@ -49,6 +49,9 @@ VantComponent({ observeClass() { const { transition, position } = this.data; this.updateClasses(transition || position); + if (transition === 'none') { + this.set({ duration: 0 }); + } } } }); diff --git a/dist/rate/index.wxss b/dist/rate/index.wxss index 22359dfc..93630236 100644 --- a/dist/rate/index.wxss +++ b/dist/rate/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{width:1em;padding:0 2px;box-sizing:content-box} \ No newline at end of file +@import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{width:1em;padding:0 2px;box-sizing:initial} \ No newline at end of file diff --git a/dist/row/index.wxss b/dist/row/index.wxss index 488afadf..9a46c3f9 100644 --- a/dist/row/index.wxss +++ b/dist/row/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-row::after{content:"";display:table;clear:both} \ No newline at end of file +@import '../common/index.wxss';.van-row:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/dist/search/index.js b/dist/search/index.js index b02b1c19..2c873c13 100644 --- a/dist/search/index.js +++ b/dist/search/index.js @@ -14,12 +14,17 @@ VantComponent({ placeholderStyle: String, background: { type: String, - value: '#f2f2f2' + value: '#ffffff' }, maxlength: { type: Number, value: -1 - } + }, + shape: { + type: String, + value: 'square' + }, + label: String }, methods: { onChange(event) { diff --git a/dist/search/index.wxml b/dist/search/index.wxml index fe64ff97..6f0beb00 100644 --- a/dist/search/index.wxml +++ b/dist/search/index.wxml @@ -1,31 +1,39 @@ + + - + + {{ label }} + + + + + + - - - +