fix(shoppingTrolley): 修复购物车切换分类后页面初始化问题

- 在切换票种分类后,重置当前选中的票种
- 优化 z-tabs 组件,确保切换分类时正确更新视图
main
Tuzki 7 months ago
parent a88a4a3488
commit a7681e5854
  1. 1
      pages/shoppingTrolley/shoppingTrolley.vue
  2. 8
      uni_modules/z-tabs/components/z-tabs/z-tabs.vue

@ -202,6 +202,7 @@
this.getTicketSortList()
this.$refs.paging.reload(true)
this.current = 0
this.ticketsort = null
this.$refs.zTab.updateSubviewLayout()
}
}

@ -296,7 +296,8 @@
handler(newVal) {
this._handleListChange(newVal);
},
immediate: false
immediate: false,
deep:true
},
bottomDotX(newVal) {
if(newVal >= 0){
@ -555,6 +556,8 @@
// #ifdef MP-BAIDU
delayTime = 100;
// #endif
console.log(this.currentIndex);
this.currentIndex = 0
setTimeout(async()=>{
for(let i = 0;i < newVal.length;i++){
const nodeRes = await this._getNodeClientRect(`#z-tabs-item-${i}`,true);
@ -571,7 +574,8 @@
}
}
this.itemNodeInfos = itemNodeInfos;
this.tabsContainerWidth = tabsContainerWidth;
// this.tabsContainerWidth =tainerWidth;
this._updateDotPosition(this.currentIndex);
},delayTime)
}

Loading…
Cancel
Save