在开发app时,遇到选项卡与swiper结合使用,问题:swiper发生抖动现象
请问:当nav和swiper绑定相同索引,swiper通过change事件改变current会发生抖动现象,该如何解决啊???
我试过将双方用不同索引绑定,swiper通过animationfinish触发改变,抖动现象会减少很多,但是除此之外还有什么解决方法,求指教,谢谢!!补充:绑定相同索引时,为何在h5或者pc端调试器上抖动现象几乎不明显,而在手机端app上调试却抖动很明显呢??
![星辰SK](https://img-cdn-tc.dcloud.net.cn/account/identicon/f7f1b72f93be90415df351757c147a78.png)
星辰SK
- 发布:2022-01-06 21:03
- 更新:2022-01-06 22:10
- 阅读:331
选项卡配合swiper抖动问题
分类:uni-app
![小枫叶](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/000/72/16/35_avatar_mid.jpg?v=1637725921)
小枫叶 - 外包接单加v:wlmk1234567 注明来意
你swiper里面放了什么? 参考这个试试https://blog.csdn.net/yyxhzdm/article/details/119179594
星辰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