vue v-for 遍历循环时的key值的报错 :Avoid using non-primitive value as key, use string/number value instead.

项目运行时候报警告,图下:

————————————————

前端代码

分析错误信息:

(Avoid using non-primitive value as key, use string/number value instead)
避免使用对象或是数组作为key,而是使用字符串/数字值
Duplicate keys detected: '[object Object]'. This may cause an update error.
检测到重复键:'[object object]'。这可能会导致更新错误。

###解决方案:可以将 :key 的值改为 Index 

posted @ 2020-05-12 10:40  Bronya天使  阅读(6021)  评论(0编辑  收藏  举报