1.2.8
osx/terminal
2.2.x
下面是一个警告的栗子:
WARNING in ./~/vue-loader/lib/template-compiler?{"id":"data-v-568c4395"}!./~/vue-loader/lib/selector.js?type=template&index=0!./~/vue-markdown-loader/_cache/tag-1.vue
(Emitted value instead of an instance of Error) <el-tag v-for="tag in tags">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for
more info.
@ ./~/vue-loader!./~/vue-markdown-loader/_cache/tag-1.vue 9:2-152
消除警告
存在大量警告,影响开发体验
这是你自己写的代码让别人怎么加.
<el-tag v-for="tag in tags">
=>
<el-tag v-for="(tag, index) in tags" :key="index">
不会影响到开发体验吧,自己在开发的时候加上就好了,目前只是文档页会有提示。如果愿意的话可以给我们提 PR。
Most helpful comment
这是你自己写的代码让别人怎么加.
<el-tag v-for="tag in tags">
=>
<el-tag v-for="(tag, index) in tags" :key="index">