(Emitted value instead of an instance of Error) Do not use v-for index as key on

不知道有没有同学碰到这样的问题,今天在运行本地Vue项目时,突然报出这样一个警告,导致编译失败

(Emitted value instead of an instance of Error) Do not use v-for index as key on children, this is the same as not using keys.
报错的意思是:子元素上,不要使用v-for索引作为键,否则与不使用键相同

原代码.png

(Emitted value instead of an instance of Error) Do not use v-for index as key on <transition-grou..._第1张图片
呀,报错啦.png

如何修改:之所以加key,是代表唯一性。
     所以我们只要给的属性值代表是此条数据的唯一性即可

修改后.png

(Emitted value instead of an instance of Error) Do not use v-for index as key on <transition-grou..._第2张图片
解决啦.png

你可能感兴趣的:((Emitted value instead of an instance of Error) Do not use v-for index as key on