|
|
@@ -10,7 +10,7 @@
|
|
|
v-if="listData.danyuanNumberList && listData.danyuanNumberList.length > 0"
|
|
|
>
|
|
|
<!-- disabled-->
|
|
|
- <icon class="word-jt jt-left" :class="{ disabled: listData.activeIndex === 0 }" @click="handleLeftClick"/>
|
|
|
+ <icon class="word-jt jt-left" :class="{ disabled: isFirstGroup }" @click="handleLeftClick"/>
|
|
|
<view class="tab-item-list" id="tab-item-list">
|
|
|
<!-- active -->
|
|
|
<ezyActiveVue
|
|
|
@@ -33,7 +33,8 @@
|
|
|
</view>
|
|
|
<!-- disabled-->
|
|
|
<icon class="word-jt jt-right"
|
|
|
- :class="{ disabled: listData.activeIndex === listData.danyuanNumberList.length - 1 }" @click="handleRightClick"/>
|
|
|
+ :class="{ disabled: isLastGroup }"
|
|
|
+ @click="handleRightClick"/>
|
|
|
</view>
|
|
|
|
|
|
<swiper
|
|
|
@@ -176,7 +177,20 @@ const isSwiperDisabled = computed(() => {
|
|
|
// 记录swiper触摸开始位置
|
|
|
let startX = 0;
|
|
|
|
|
|
+// 计算属性,判断是否在第一组
|
|
|
+const isFirstGroup = computed(() => {
|
|
|
+ const chunkSize = 4;
|
|
|
+ const currentGroup = Math.floor(listData.activeIndex / chunkSize);
|
|
|
+ return currentGroup === 0;
|
|
|
+});
|
|
|
|
|
|
+// 计算属性,判断是否在最后一组
|
|
|
+const isLastGroup = computed(() => {
|
|
|
+ const chunkSize = 4;
|
|
|
+ const currentGroup = Math.floor(listData.activeIndex / chunkSize);
|
|
|
+ const totalGroups = Math.ceil(listData.danyuanNumberList.length / chunkSize);
|
|
|
+ return currentGroup >= totalGroups - 1;
|
|
|
+});
|
|
|
|
|
|
|
|
|
// 处理左侧箭头点击
|