列表渲染里面的 key取值,编译成小程序KEY出错
-
arr=[{id:00123,st:'kkll'},{id:00124,st:'aabb'}]
列表渲染里面的 key取值 arr.map(item => <Index item={item} key={item.id} />
-
实际上,每个item里面是有一个单独的id对于的唯一的字符串
-
-
直接去map((item,index)=>< key={index} />)
-
路过的哥哥姐姐帮忙解答下!谢谢