<swiper indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}">
<block wx:for="{{imgUrls}}">
<swiper-item>
<image src="{{item}}" class=“toutu”/>
</swiper-item>
</block>
</swiper>
Now you can provide attr “wx:key” for a “wx:for” to improve performance.
Now you can provide attr “wx:key” for a “wx:for” to improve performance.
20 |
21 | <swiper indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}">
> 22 | <block wx:for="{{imgUrls}}">
| ^
23 | <swiper-item>
24 | <image src="{{item}}" class=“toutu”/>
25 | </swiper-item>
报这个错误
这是个警告,意思是wx:for的节点最好提供wx:key来避免潜在的问题。详情请参阅文档关于wx:for的章节。
https://mp.weixin.qq.com/debug/wxadoc/dev/framework/view/wxml/list.html