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“,这可能会导致更新错误)

在这里插入图片描述

如果上图所示,如果key,全都绑定了 index,那么就会报错,所以要将key区分开,保证key的唯一性。

猜你喜欢

转载自blog.csdn.net/qq_24147051/article/details/94443291
今日推荐