Duplicate keys detected: '0'. This may cause an update error.

在运行vue项目的时候报了:[Vue warn]: Duplicate keys detected: ‘0’. This may cause an update error(错误,检测到重复的key值:”0“,这可能会导致更新错误)

在同一个template中,出现了两个一样的v-for.

解决方法:

将其中一个key值修改一下

保证key值的唯一性就可以了。

原文地址:https://www.cnblogs.com/ss-wdp/p/11726225.html