微信小程序 消除警告: 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.
首先,我们要先了解几个知识点:
1、wx:key:
如果列表中项目的位置会动态改变或者有新的项目添加到列表中,并且希望列表中的项目保持自己的特征和状态(如 中的输入内容, 的选中状态),需要使用 wx:key 来指定列表中项目的唯一...
原创
2019-12-05 10:42:09 ·
6594 阅读 ·
4 评论