最近使用swiper组件时,遇到的问题,点击swiper内任何地方animationfinish事件都会触发,导致写在animationfinish事件中的代码不断被执行,影响操作,
因为我的操作就是需要在current改变的时候执行,翻看文档uniapp文档链接后发现swiper有change事件(current改变的时候触发),所以我的解决办法是将原来在animationfinish中执行的代码转移到change事件中。解决
<view class="tab">
<u-tabs-swiper ref="uTabs" @change="tabsChange" :list="list" :current="current" :bold="false" bar-height="3" bar-width="60" active-color="#333333" :is-scroll="false" inactive-color="#808080" font-size="28"></u-tabs-swiper>
</view>
<swiper :</