component lists rendered with v-for should have explicit keys

By | 2017年9月22日

webpack编译的时候报错如下:

WARNING in ./node_modules/vue-loader/lib/template-compiler?{“id”:”data-v-17cf5f56″,”hasScoped”:true}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/console/list.vue

(Emitted value instead of an instance of Error) : component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.

通过报错警告中的提示信息,我们访问https://vuejs.org/guide/list.html#key,得到解决方案:

component lists rendered with v-for should have explicit keys

发表评论

电子邮件地址不会被公开。 必填项已用*标注