一进页面,就报了几百个错误,属实吓人

报错如下:

vue报错:Duplicate keys detected: ‘4403‘. This may cause an update error

原因:v-for循环时,key值不唯一,如果重复就会报错,所以查找页面代码里的for循环

vue报错:Duplicate keys detected: ‘4403‘. This may cause an update error

解决:key值换成index,不过直接用index作为key并不是一个好的选择,不利于性能的提升,可以使用item的唯一id更好

vue报错:Duplicate keys detected: ‘4403‘. This may cause an update error

相关文章:

  • 2021-06-12
  • 2021-12-11
  • 2021-07-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2021-08-02
  • 2021-04-05
  • 2021-12-31
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案