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

This commit is contained in:
15093570141
2024-11-15 13:37:38 +08:00
parent 54a6f3552b
commit d729fadd0b

View File

@@ -4,7 +4,7 @@
<view class="big-classify">
<view class="scroll-view-box">
<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 }]"
v-for="item, index in state.classifyData" :key="index" @click="hanldeChangeTopTab(item, index)">
<view class="img-box">
@@ -329,13 +329,14 @@
/** 切换顶部tab */
const hanldeChangeTopTab = (item : CategoriesType, index : number) => {
if (state.leftTabId != item.id) {
calculationTopMovingDistance(index);
state.topTabId = item.id;
state.catId = item.id;
state.leftTabId = item?.child[0].id;
state.leftTabList = item?.child;
state.rightTabList = item?.child[0]?.child;
calculationTopMovingDistance(index);
handleResetGoodsList();
hanlderHidebigClassifyPop();
}