< swiper class = "banner-container" wx:if = "bannerData.imgLists" current = "{{bannerData.current}}" circular = 'true' interval = '{{bannerData.aa}}' autoplay = "{{bannerData.autoplay}}" indicator-dots="{{bannerData.imgLists.length>0}}" indicator-active-color="{{bannerData.indicatorActiveColor}}"> < swiper-item wx:for = "{{bannerData.imgLists}}" wx:key = "index" > < image class = "banner-img" src = "{{item.src}}" ></ image > < navigator wx:if = "{{item.alink}}" class = "banner-alink" hover-class = "none" url = "{{item.alink}}" open-type = '{{item.openType}}' ></ navigator > </ swiper-item > </ swiper > |
interval的参数设置如果不是直接给一个数字或者对象属性不是interval(比如上面的bannerData.aa),interval会被设置成0,图片轮播非常快,以一下是控制台截图