Merge branch 'dev' into 'master'

uniapp【修复】:商品分类叮咚样式头部滑动问题,滚动条隐藏

See merge request jianweie/coreshoppro!86
This commit is contained in:
花城
2024-11-15 05:37:53 +00:00

View File

@@ -4,7 +4,7 @@
<view class="big-classify"> <view class="big-classify">
<view class="scroll-view-box"> <view class="scroll-view-box">
<scroll-view class="scroll-view" enable-flex :scroll-x="true" :scroll-left="state.topScrollLeft" <scroll-view class="scroll-view" enable-flex :scroll-x="true" :scroll-left="state.topScrollLeft"
:scroll-with-animation="true"> :scroll-with-animation="true" :show-scrollbar="false">
<view :class="['item', { 'on': state.topTabId === item.id }]" <view :class="['item', { 'on': state.topTabId === item.id }]"
v-for="item, index in state.classifyData" :key="index" @click="hanldeChangeTopTab(item, index)"> v-for="item, index in state.classifyData" :key="index" @click="hanldeChangeTopTab(item, index)">
<view class="img-box"> <view class="img-box">
@@ -329,13 +329,14 @@
/** 切换顶部tab */ /** 切换顶部tab */
const hanldeChangeTopTab = (item : CategoriesType, index : number) => { const hanldeChangeTopTab = (item : CategoriesType, index : number) => {
if (state.leftTabId != item.id) { if (state.leftTabId != item.id) {
calculationTopMovingDistance(index);
state.topTabId = item.id; state.topTabId = item.id;
state.catId = item.id; state.catId = item.id;
state.leftTabId = item?.child[0].id; state.leftTabId = item?.child[0].id;
state.leftTabList = item?.child; state.leftTabList = item?.child;
state.rightTabList = item?.child[0]?.child; state.rightTabList = item?.child[0]?.child;
calculationTopMovingDistance(index);
handleResetGoodsList(); handleResetGoodsList();
hanlderHidebigClassifyPop(); hanlderHidebigClassifyPop();
} }