4498关注13704浏览
VM3189:2 ./pages/index/index.wxml
(anonymous) @ VM3189:2
VM3189:3 Now you can provide attr "wx:key" for a "wx:for" to improve performance.
203 | </view>
204 | <view class="goods-list flex-row goods-list-cols-{{cat_goods_cols}}">
> 205 | <view class="flex-grow-0" wx:for="{{cat.goods_list}}" wx:for-index="goods_index" wx:for-item="goods">
| ^
206 | <navigator class="goods-item" url="/pages/goods/goods?id={{goods.id}}">
207 | <image src="{{goods.pic_url}}" mode="aspectFill" />
208 | <text class="text-more-2 {{cat_goods_cols == 3?'fs-sm':''}}" style='padding:0 20rpx;height:2.8em;line-height:1.4;'>{{goods.name}}
(anonymous) @ VM3189:3
-
至过去的我
2044人对此回答表示赞同
我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多> -
Ruby
15人对此回答表示赞同
https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/list.html
展开150回复分享发布于 6年前评论(0)
收起评论
-
荣光不复
14人对此回答表示赞同
加个wx:key="",这是警告不是报错,可以选择性无视。
展开140回复分享发布于 6年前评论(0)
收起评论