背景

在使用VScode编辑器vue开发过程中,v-for在Eslint的规则检查下出现报错:Elements in iteration expect to have ‘v-bind:key’ directives。

Elements in iteration expect to have ‘v-bind:key‘ directives.eslint-plugin-vue

报错原因:
安装了ESLint插件,对vue进行了eslint检查。

解决

文件 ---> 首选项 --->,在搜索框中输入: vetur.validation.template

把勾去掉,重启VsCode即可

相关文章: