动态修改swiper组件的绑定值后 current属性变成了-1
使用swiper组件做的banner , 更改绑定值后, current属性有很大几率变成-1
wxml 调试器代码
代码如下:
< swiper autoplay = "true" circular = "true" interval = "2500" current = "0" duration = "1000" indicator-dots = "true" class = "index-adcs-sqiper index-banner-sqiper left" style = "height: 360rpx" > < swiper-item wx:for = "{{banner}}" wx:for-index = "childid" wx:for-item = "childitem" > < navigator class = "index-advs-navigator" url = "{{childitem.link_wxapp}}" > < image class = "advimg" mode = "scaleToFill" src = "{{childitem.thumb}}" ></ image > </ navigator > </ swiper-item > </ swiper > |
2 回复