星辰SK
星辰SK
  • 发布:2022-01-06 21:03
  • 更新:2022-01-06 22:10
  • 阅读:261

选项卡配合swiper抖动问题

分类:uni-app

在开发app时,遇到选项卡与swiper结合使用,问题:swiper发生抖动现象
请问:当nav和swiper绑定相同索引,swiper通过change事件改变current会发生抖动现象,该如何解决啊???
我试过将双方用不同索引绑定,swiper通过animationfinish触发改变,抖动现象会减少很多,但是除此之外还有什么解决方法,求指教,谢谢!!补充:绑定相同索引时,为何在h5或者pc端调试器上抖动现象几乎不明显,而在手机端app上调试却抖动很明显呢??

2022-01-06 21:03 负责人:无 分享
已邀请:
小枫叶

小枫叶 - 外包接单加v:wlmk1234567 注明来意

  • 星辰SK (作者)

    <swiper class="local-swiper" :current="swiperCurrent" @animationfinish="swiperChange"

    @change="dotChange">

    <swiper-item v-for="(item,index) in swiperList" :key="index">

    <view class="local-nav">

    <view class="local-item flexY" v-for="(it,idx) in item" :key="idx">

    <image :src="it.image" class="local-item-icon" mode="aspectFit"></image>

    <text class="local-item-title">{{it.title}}</text>

    <text class="local-item-ftitle">{{it.ftitle}}</text>

    </view>

    </view>

    </swiper-item>

    </swiper>

    <view class="dots flexX">

    <text :class="['dots-box',{'dot-active':dotCurrent == index}]"

    v-for="(item,index) in swiperList" :key="index"></text>

    </view>

    绑定同样的current就会出现明显的抖动

    2022-01-07 09:41

该问题目前已经被锁定, 无法添加新回复