项目运行时候报警告,图下:
vue v-for 遍历循环时的key值的报错 :Avoid using non-primitive value as key, use string/number value instead.

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

前端代码

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 

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

相关文章:

  • 2021-04-18
  • 2021-11-19
  • 2022-01-07
  • 2022-01-11
  • 2021-05-29
  • 2021-12-31
  • 2022-12-23
  • 2021-09-21
猜你喜欢
  • 2021-11-21
  • 2021-10-16
  • 2022-01-13
  • 2021-10-17
  • 2021-09-20
相关资源
相似解决方案