swiper自定义dots样式后,轮播图出现晃动卡顿问题
在微信小程序的官方文档中,有这样个提示:
![在这里插入图片描述](https://img-blog.csdnimg.cn/66ece5b8518a4f359ff6b989374f7559.png)
解决方法:用bindanimationfinish改变当前滑块的值;用bindchange改变dot的索引值;swiper上current的值与自定义的dots上所用的索引值参数名需不一致;
代码:
wxml
<view class="advertising-banner">
<swiper wx:if="{
{ adsListData.length > 0 }}" class="ads-swiper" current="{
{currentSwiper}}"