这个警告该怎么解决?是要修改video里的key吗?

[WDS] Warnings while compiling.
./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-45eba5d4","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/RotationChart_gzh.vue
(Emitted value instead of an instance of Error) Do not use v-for index as key on <transition-group> children, this is the same as not using keys.
1571034028(1).png

阅读 3.6k
2 个回答

这里是提示你v-for时不要:key="index",而是用其他唯一的值,如每一项的id,:key="item.id"

在imgList加标识,已解决

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题