mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:53:27 +08:00
【优化】优化点餐模式下商品分类的子类切换后,再切换商品大类,子类下标未自动回移到第一下标的问题。
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="headerH" :style="'height:' + scorllH+'px;'" @scrolltolower="scrolltolower">
|
||||
<u-sticky v-if="menuChilds">
|
||||
<view class="coreshop-bg-white coreshop-padding-left-10">
|
||||
<u-tabs :list="menuChilds" :current="childCurrent" :activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.05)',fontSize:'14px'}" :inactiveStyle="{color: '#606266',transform: 'scale(1)',fontSize:'14px'}" @change="childIdCheck"></u-tabs>
|
||||
<u-tabs :list="menuChilds" :current="childCurrent" :activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.05)',fontSize:'14px'}" :inactiveStyle="{color: '#606266',transform: 'scale(1)',fontSize:'14px'}" @change="clickChange"></u-tabs>
|
||||
</view>
|
||||
</u-sticky>
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
this.menuChilds = res.data[0].child;
|
||||
this.getGoods();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -439,14 +439,10 @@
|
||||
this.currentCateId = id;
|
||||
this.needCurrentCateId = id;
|
||||
|
||||
this.childCurrent = 1;
|
||||
console.log('childCurrent', this.childCurrent);
|
||||
|
||||
this.menuChilds = [];
|
||||
this.menuChilds = _this.menus[index].child;
|
||||
|
||||
this.childCurrent = 0;
|
||||
console.log('childCurrent', this.childCurrent);
|
||||
this.$forceUpdate()
|
||||
|
||||
this.page = 1;
|
||||
@@ -454,7 +450,8 @@
|
||||
this.getGoods(0);
|
||||
|
||||
},
|
||||
childIdCheck(e) {
|
||||
clickChange(e) {
|
||||
this.childCurrent = e.index;
|
||||
if (e.id != 0) {
|
||||
this.needCurrentCateId = e.id;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user