react中map循环中key取值问题
数组中没有唯一的key,可以定义变量,拼接字符串连接。
let i = 0; key={`infoItem-col-${i++}`}
posted on 2019-03-11 18:07 Diamond_xx 阅读(889) 评论(0) 编辑 收藏 举报
数组中没有唯一的key,可以定义变量,拼接字符串连接。
let i = 0; key={`infoItem-col-${i++}`}
posted on 2019-03-11 18:07 Diamond_xx 阅读(889) 评论(0) 编辑 收藏 举报