使用vscode报错Elements in iteration expect to have 'v-bind:key' directives

在使用vscode写vue的时候会出现这样一个错误:

[eslint-plugin-vue]
[vue/require-v-for-key]
Elements in iteration expect to have 'v-bind:key' directives.
Renders the element or template block multiple times based on the source data.

这是在使用插件vetur的问题,关闭了就行了。打开vscode-首选项-设置-工作区设置
把"vetur.validation.template": true改成

"vetur.validation.template": false

保存一下就解决了。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容