优化滑动页面

This commit is contained in:
TOP糯米 2023-03-16 23:36:51 +08:00
parent 8cd7fa2bce
commit 0021d2b433
3 changed files with 11 additions and 3 deletions

View File

@ -17,7 +17,11 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="order-group"> <view class="order-group">
<swiper :current="tabIndex" :style="{ height: tabHeight + 'px' }" @change="switchTab($event.detail.current)"> <swiper
:current="tabIndex"
:style="{ minHeight: '75vh', height: tabHeight + 'px' }"
@change="switchTab($event.detail.current)"
>
<swiper-item v-for="(item, index) in tabList" :key="index"> <swiper-item v-for="(item, index) in tabList" :key="index">
<view :class="['tab' + index]"> <view :class="['tab' + index]">
<view class="order-item-box" v-for="(v, k) in item.list" :key="k" @click.stop="toDetail(v.id)"> <view class="order-item-box" v-for="(v, k) in item.list" :key="k" @click.stop="toDetail(v.id)">

View File

@ -12,7 +12,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="message-container"> <view class="message-container">
<swiper :current="tabIndex" :style="{ height: tabHeight + 'px' }" @change="changeTab"> <swiper :current="tabIndex" :style="{ minHeight: '75vh', height: tabHeight + 'px' }" @change="changeTab">
<swiper-item v-for="(item, index) in tabList" :key="index"> <swiper-item v-for="(item, index) in tabList" :key="index">
<view :class="['tab' + index]"> <view :class="['tab' + index]">
<view <view

View File

@ -28,7 +28,11 @@
</view> </view>
</view> </view>
<view class="order-group"> <view class="order-group">
<swiper :current="tabIndex" :style="{ height: tabHeight + 'px' }" @change="switchTab($event.detail.current)"> <swiper
:current="tabIndex"
:style="{ minHeight: '75vh', height: tabHeight + 'px' }"
@change="switchTab($event.detail.current)"
>
<swiper-item v-for="(item, index) in tabList" :key="index"> <swiper-item v-for="(item, index) in tabList" :key="index">
<view :class="['tab' + index]"> <view :class="['tab' + index]">
<view class="order-item-box" v-for="(v, k) in item.list" :key="k" @click.stop="toDetail(v.id)"> <view class="order-item-box" v-for="(v, k) in item.list" :key="k" @click.stop="toDetail(v.id)">