页面中多个for在一级, key不能相同 正确的写法: [代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list1}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"list1"[代码][代码]></[代码][代码]view[代码][代码]>[代码] [代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list2}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"list2"[代码][代码]></[代码][代码]view[代码][代码]>[代码] 不正确的写法: [代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list1}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"list"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list2}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"list"[代码][代码]></[代码][代码]view[代码][代码]>[代码] [代码] [代码] [代码][代码] [代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list1}}"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{list2}}"[代码][代码]></[代码][代码]view[代码][代码]>[代码]
Do not set same key {[object Object]}[代码]Do not [代码][代码]set[代码] [代码]same key {[object [代码][代码]Object[代码][代码]]} [代码][代码]in[代码] [代码]wx:key.[代码] 我在调用 setData() 时,有时会有这个 warning,这个是什么原因呢? [代码]var[代码] [代码]that = [代码][代码]this[代码][代码]that.setData({[代码][代码] [代码][代码]...[代码][代码]})[代码] 都是出现在「列表渲染」的数据中,能帮忙解答一下吗?谢谢!
2018-09-19