|
@@ -16,6 +16,9 @@ Component({
|
|
|
},
|
|
|
onChange: {
|
|
|
type: Function
|
|
|
+ },
|
|
|
+ isShow: {
|
|
|
+ type: Boolean
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -40,14 +43,15 @@ Component({
|
|
|
/* 改变选中 */
|
|
|
changeTab(e) {
|
|
|
if (this.data.acIndex == e.currentTarget.dataset.index) return;
|
|
|
- this.setData({
|
|
|
- acIndex: e.currentTarget.dataset.index
|
|
|
- })
|
|
|
+ this.setData({
|
|
|
+ acIndex: e.currentTarget.dataset.index
|
|
|
+ })
|
|
|
this.triggerEvent("onChange", e.currentTarget.dataset.item)
|
|
|
this.setBorBotLeft()
|
|
|
},
|
|
|
//更改横线位置
|
|
|
setBorBotLeft() {
|
|
|
+ if (this.data.isShow) return;
|
|
|
let animation = wx.createAnimation({
|
|
|
duration: 1000,
|
|
|
timingFunction: 'ease',
|