diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml index 4d851529..5bfe879d 100644 --- a/dist/action-sheet/index.wxml +++ b/dist/action-sheet/index.wxml @@ -7,34 +7,34 @@ close-on-click-overlay="{{ closeOnClickOverlay }}" bind:close="onClose" > - - {{ title }} - - - - + + {{ title }} + + {{ cancelText }} - - - + diff --git a/dist/action-sheet/index.wxss b/dist/action-sheet/index.wxss index 1278a8b5..15f3a60b 100644 --- a/dist/action-sheet/index.wxss +++ b/dist/action-sheet/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-action-sheet{color:#333;max-height:90%;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:#f8f8f8}.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__name,.van-action-sheet__subname{display:inline-block}.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 +@import '../common/index.wxss';.van-action-sheet{color:#333;max-height:90%!important;background-color:#f8f8f8!important}.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: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__cancel{margin-top:10px}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{top:0;right:0;padding:0 15px;color:#999;font-size:18px!important;position:absolute!important;line-height:inherit!important} \ No newline at end of file diff --git a/dist/area/index.js b/dist/area/index.js index 7db2585d..081ad3e8 100644 --- a/dist/area/index.js +++ b/dist/area/index.js @@ -64,7 +64,7 @@ VantComponent({ }); var values = displayColumns[index]; - if (!value[index] || !values[value[index]]) { + if (index < 0 || value[index] < 0 || !values[value[index]]) { return; } diff --git a/dist/button/index.wxml b/dist/button/index.wxml index 6ee5b74a..acb6693b 100644 --- a/dist/button/index.wxml +++ b/dist/button/index.wxml @@ -1,29 +1,29 @@ diff --git a/dist/button/index.wxss b/dist/button/index.wxss index cf187884..10d9a3e0 100644 --- a/dist/button/index.wxss +++ b/dist/button/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-button{position:relative;padding:0;display:inline-block;height:44px;line-height:42px;border-radius:2px;box-sizing:border-box;font-size:16px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button::after{content:" ";position:absolute;top:50%;left:50%;opacity:0;width:100%;height:100%;border:inherit;border-color:#000;background-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:active::after{opacity:.3}.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:#4b0;border:1px solid #4b0}.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:#4b0}.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;padding:0 8px;min-width:60px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;line-height:20px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{width:100%;display:block}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5} \ No newline at end of file +@import '../common/index.wxss';.van-button{position:relative;padding:0;display:inline-block;height:44px;line-height:42px;border-radius:2px;box-sizing:border-box;font-size:16px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button::after{content:" ";position:absolute;top:50%;left:50%;opacity:0;width:100%;height:100%;border:inherit;border-color:#000;background-color:#000;border-radius:inherit;-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:#4b0;border:1px solid #4b0}.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:#4b0}.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;padding:0 8px;min-width:60px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;line-height:20px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{width:100%;display:block}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5} \ No newline at end of file diff --git a/dist/card/index.js b/dist/card/index.js index 4e51c19f..8174f9fb 100644 --- a/dist/card/index.js +++ b/dist/card/index.js @@ -1,6 +1,8 @@ +import { link } from '../mixins/link'; import { VantComponent } from '../common/component'; VantComponent({ - classes: ['thumb-class', 'title-class', 'price-class', 'desc-class', 'num-class'], + classes: ['num-class', 'desc-class', 'thumb-class', 'title-class', 'price-class', 'origin-price-class'], + mixins: [link], props: { tag: String, num: String, @@ -11,9 +13,10 @@ VantComponent({ centered: Boolean, lazyLoad: Boolean, thumbLink: String, - linkType: { + originPrice: String, + thumbMode: { type: String, - value: 'navigateTo' + value: 'scaleToFill' }, currency: { type: String, @@ -22,13 +25,7 @@ VantComponent({ }, methods: { onClickThumb: function onClickThumb() { - var thumbLink = this.data.thumbLink; - - if (thumbLink) { - wx[this.data.linkType]({ - url: thumbLink - }); - } + this.jumpLink('thumbLink'); } } }); \ No newline at end of file diff --git a/dist/card/index.wxml b/dist/card/index.wxml index 5e8b3411..a5869519 100644 --- a/dist/card/index.wxml +++ b/dist/card/index.wxml @@ -1,6 +1,12 @@ - + + - + {{ title }} - {{ currency }} {{ price }} - - - + + {{ desc }} + + + + + + {{ currency }} {{ price }} + {{ currency }} {{ originPrice }} x {{ num }} - - + diff --git a/dist/card/index.wxss b/dist/card/index.wxss index 5c2d5e48..265036e5 100644 --- a/dist/card/index.wxss +++ b/dist/card/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-card{color:#333;height:100px;font-size:12px;background:#fafafa;position:relative;box-sizing:border-box;padding:5px 15px 5px 115px}.van-card--center,.van-card__thumb{-webkit-align-items:center;align-items: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-flex;display:flex}.van-card__content{width:100%}.van-card__content--center{height:90px;-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}.van-card__desc{max-height:20px;color:#666}.van-card__num,.van-card__price{-webkit-flex:1;flex:1;min-width:80px;line-height:20px;text-align:right}.van-card__num{color:#666}.van-card__tag{position:absolute;top:2px;left:0}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{right:15px;bottom:5px;position:absolute}.van-card__footer .van-button{margin-left:5px} \ No newline at end of file +@import '../common/index.wxss';.van-card{box-sizing:border-box;position:relative;height:100px;padding:5px 15px 5px 115px;background:#fafafa;color:#333;font-size:12px}.van-card--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:absolute;top:5px;left:15px;width:90px;height:90px}.van-card__img{width:100%;height:100%}.van-card,.van-card__content{display:-webkit-flex;display:flex}.van-card__content{width:100%}.van-card__desc,.van-card__title{line-height:20px;word-break:break-all}.van-card__title{max-height:40px}.van-card__desc{max-height:20px;color:#666}.van-card__left{-webkit-flex:1;flex:1}.van-card__right{-webkit-flex:none;flex:none;padding-left:10px;line-height:20px;text-align:right}.van-card__origin-price{color:#666;text-decoration:line-through}.van-card__num{color:#666}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{position:absolute;right:15px;bottom:5px}.van-card__footer .van-button{margin-left:5px} \ No newline at end of file diff --git a/dist/cell/index.js b/dist/cell/index.js index a8a016fb..243b58a0 100644 --- a/dist/cell/index.js +++ b/dist/cell/index.js @@ -1,10 +1,11 @@ +import { link } from '../mixins/link'; import { VantComponent } from '../common/component'; VantComponent({ classes: ['title-class', 'label-class', 'value-class'], + mixins: [link], props: { title: null, value: null, - url: String, icon: String, label: String, center: Boolean, @@ -13,10 +14,6 @@ VantComponent({ clickable: Boolean, titleWidth: String, customStyle: String, - linkType: { - type: String, - value: 'navigateTo' - }, border: { type: Boolean, value: true @@ -38,16 +35,9 @@ VantComponent({ } }, methods: { - onClick: function onClick() { - var url = this.data.url; - - if (url) { - wx[this.data.linkType]({ - url: url - }); - } - - this.$emit('click'); + onClick: function onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); } } }); \ No newline at end of file diff --git a/dist/cell/index.wxml b/dist/cell/index.wxml index ee92995f..4d8bc746 100644 --- a/dist/cell/index.wxml +++ b/dist/cell/index.wxml @@ -22,7 +22,7 @@ - {{ value }} + {{ value }} diff --git a/dist/cell/index.wxss b/dist/cell/index.wxss index 55a2e32e..91f6ac0b 100644 --- a/dist/cell/index.wxss +++ b/dist/cell/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-cell{width:100%;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{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{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.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--clickable: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-align-items:center;align-items:center} \ No newline at end of file +@import '../common/index.wxss';.van-cell{width:100%;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{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{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon{font-size:16px!important;line-height:24px;margin-right:5px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px!important;line-height:24px;margin-left:5px}.van-cell--clickable: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-align-items:center;align-items:center} \ No newline at end of file diff --git a/dist/common/component.js b/dist/common/component.js index 2c0af5d1..0bae29c7 100644 --- a/dist/common/component.js +++ b/dist/common/component.js @@ -10,6 +10,10 @@ function mapKeys(source, target, map) { } function VantComponent(vantOptions) { + if (vantOptions === void 0) { + vantOptions = {}; + } + var options = {}; mapKeys(vantOptions, options, { data: 'data', @@ -23,7 +27,8 @@ function VantComponent(vantOptions) { destroyed: 'detached', classes: 'externalClasses' }); - var relation = vantOptions.relation; + var _vantOptions = vantOptions, + relation = _vantOptions.relation; if (relation) { options.relations = Object.assign(options.relations || {}, { diff --git a/dist/dialog/index.js b/dist/dialog/index.js index 3b7fbf7d..937a2aee 100644 --- a/dist/dialog/index.js +++ b/dist/dialog/index.js @@ -9,6 +9,7 @@ VantComponent({ useSlot: Boolean, asyncClose: Boolean, showCancelButton: Boolean, + closeOnClickOverlay: Boolean, confirmButtonOpenType: String, zIndex: { type: Number, @@ -29,10 +30,6 @@ VantComponent({ overlay: { type: Boolean, value: true - }, - closeOnClickOverlay: { - type: Boolean, - value: false } }, data: { diff --git a/dist/dialog/index.wxml b/dist/dialog/index.wxml index 46dc8f0d..4058786b 100644 --- a/dist/dialog/index.wxml +++ b/dist/dialog/index.wxml @@ -3,48 +3,51 @@ transition="scale" z-index="{{ zIndex }}" overlay="{{ overlay }}" - close-on-click-overlay="{{ closeOnClickOverlay }}" custom-class="van-dialog" + close-on-click-overlay="{{ closeOnClickOverlay }}" bind:close="onClickOverlay" > - + {{ title }} - - - - {{ message }} - + + + + {{ message }} - - - - {{ cancelButtonText }} - - - + - - {{ confirmButtonText }} - - + {{ cancelButtonText }} + + + {{ confirmButtonText }} + diff --git a/dist/dialog/index.wxss b/dist/dialog/index.wxss index c7627ef4..7c88477a 100644 --- a/dist/dialog/index.wxss +++ b/dist/dialog/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5}.van-dialog__message--has-title{padding-top:12px;color:#666}.van-dialog__footer{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm,.van-dialog__confirm:active{color:#38f!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} \ No newline at end of file +@import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5}.van-dialog__message--has-title{padding-top:12px;color:#666}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm,.van-dialog__confirm:active{color:#38f!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} \ No newline at end of file diff --git a/dist/mixins/button.js b/dist/mixins/button.js index 9e0dc31e..fe8c5d03 100644 --- a/dist/mixins/button.js +++ b/dist/mixins/button.js @@ -1,11 +1,12 @@ export var button = Behavior({ properties: { id: String, + sessionFrom: String, appParameter: String, - sendMessageTitle: String, - sendMessagePath: String, sendMessageImg: String, + sendMessagePath: String, showMessageCard: String, + sendMessageTitle: String, hoverStopPropagation: Boolean, hoverStartTime: { type: Number, @@ -18,10 +19,6 @@ export var button = Behavior({ lang: { type: String, value: 'en' - }, - sessionFrom: { - type: String, - value: '' } } }); \ No newline at end of file diff --git a/dist/submit-bar/index.wxss b/dist/submit-bar/index.wxss index 72e3084a..83bb0e26 100644 --- a/dist/submit-bar/index.wxss +++ b/dist/submit-bar/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-submit-bar{z-index:100;position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;background-color:#fff7cc;color:#ff976a;font-size:12px;line-height:18px}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:50px;background-color:#fff;font-size:14px}.van-submit-bar__text{-webkit-flex:1;flex:1;color:#333;font-weight:500;text-align:right}.van-submit-bar__price{padding-right:12px;color:#f44}.van-submit-bar__button button{width:110px}.van-submit-bar__button--disabled button{border:none!important} \ No newline at end of file +@import '../common/index.wxss';.van-submit-bar{z-index:100;position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;color:#f56723;font-size:12px;line-height:18px;background-color:#fff7cc}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:50px;background-color:#fff;font-size:14px}.van-submit-bar__text{-webkit-flex:1;flex:1;color:#333;font-weight:500;text-align:right}.van-submit-bar__price{padding-right:12px;color:#f44}.van-submit-bar__button button{width:110px}.van-submit-bar__button--disabled button{border:none!important} \ No newline at end of file diff --git a/dist/tabbar-item/index.js b/dist/tabbar-item/index.js index 440b936f..553e91ae 100644 --- a/dist/tabbar-item/index.js +++ b/dist/tabbar-item/index.js @@ -10,8 +10,7 @@ VantComponent({ type: 'ancestor' }, data: { - active: false, - count: 0 + active: false }, methods: { onClick: function onClick() { @@ -23,13 +22,11 @@ VantComponent({ this.$emit('click'); }, - setActive: function setActive(data) { - var _this$data = this.data, - active = _this$data.active, - count = _this$data.count; - - if (active !== data.active || count !== data.count) { - this.setData(data); + setActive: function setActive(active) { + if (this.data.active !== active) { + this.setData({ + active: active + }); } } } diff --git a/dist/tabbar-item/index.wxml b/dist/tabbar-item/index.wxml index d888e740..cdcd3df3 100644 --- a/dist/tabbar-item/index.wxml +++ b/dist/tabbar-item/index.wxml @@ -1,6 +1,5 @@ diff --git a/dist/tabbar-item/index.wxss b/dist/tabbar-item/index.wxss index 845a2ea3..6664cd29 100644 --- a/dist/tabbar-item/index.wxss +++ b/dist/tabbar-item/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-tabbar-item{float:left;color:#666;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:50px;height:18px}.van-tabbar-item--active{color:#38f} \ No newline at end of file +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#666;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:50px;height:18px}.van-tabbar-item--active{color:#38f} \ No newline at end of file diff --git a/dist/tabbar/index.js b/dist/tabbar/index.js index 07eecd9d..bc4d3f6e 100644 --- a/dist/tabbar/index.js +++ b/dist/tabbar/index.js @@ -55,10 +55,7 @@ VantComponent({ var _this3 = this; this.data.items.forEach(function (item, index) { - item.setActive({ - active: index === _this3.data.currentActive, - count: _this3.data.items.length - }); + item.setActive(index === _this3.data.currentActive); }); }, onChange: function onChange(child) { diff --git a/dist/tabbar/index.wxss b/dist/tabbar/index.wxss index 1614ab85..f3e18c85 100644 --- a/dist/tabbar/index.wxss +++ b/dist/tabbar/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-tabbar{width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{left:0;bottom:0;position:fixed} \ No newline at end of file +@import '../common/index.wxss';.van-tabbar{width:100%;height:50px;display:-webkit-flex;display:flex;background-color:#fff}.van-tabbar--fixed{left:0;bottom:0;position:fixed} \ No newline at end of file diff --git a/dist/tabs/index.js b/dist/tabs/index.js index b78b8cc7..140734d0 100644 --- a/dist/tabs/index.js +++ b/dist/tabs/index.js @@ -42,7 +42,7 @@ VantComponent({ }, zIndex: { type: Number, - value: 99 + value: 1 }, swipeThreshold: { type: Number, diff --git a/dist/tabs/index.wxml b/dist/tabs/index.wxml index 76e22bcb..2138fef7 100644 --- a/dist/tabs/index.wxml +++ b/dist/tabs/index.wxml @@ -4,6 +4,7 @@ scroll-x="{{ scrollable }}" scroll-with-animation scroll-left="{{ scrollLeft }}" + class="van-tabs__scroll--{{ type }}" > diff --git a/dist/tabs/index.wxss b/dist/tabs/index.wxss index ff52b401..c3050a54 100644 --- a/dist/tabs/index.wxss +++ b/dist/tabs/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{top:0;left:0;right:0;position:absolute}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__nav{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;position:relative;background-color:#fff}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{margin:0 15px;border-radius:2px;box-sizing:border-box;border:1px solid #f44;height:30px}.van-tabs__nav--card .van-tab{color:#f44;border-right:1px solid #f44;line-height:28px}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{z-index:1;left:0;bottom:0;height:2px;position:absolute;background-color:#f44;border-radius:2px 0 2px 0}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tab{-webkit-flex:1;flex:1;cursor:pointer;padding:0 5px;font-size:14px;position:relative;color:#333;line-height:44px;text-align:center;box-sizing:border-box;background-color:#fff;min-width:0}.van-tab span{display:block}.van-tab--active{color:#f44}.van-tab--disabled{color:#c9c9c9} \ No newline at end of file +@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{top:0;left:0;right:0;position:absolute}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;position:relative;background-color:#fff}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{color:#f44;border-right:1px solid #f44;line-height:28px}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{z-index:1;left:0;bottom:0;height:2px;position:absolute;background-color:#f44;border-radius:2px 0 2px 0}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tab{-webkit-flex:1;flex:1;cursor:pointer;padding:0 5px;font-size:14px;position:relative;color:#333;line-height:44px;text-align:center;box-sizing:border-box;background-color:#fff;min-width:0}.van-tab span{display:block}.van-tab--active{color:#f44}.van-tab--disabled{color:#c9c9c9} \ No newline at end of file