vetur插件提示 [vue-language-server] Elements in iteration expect to have 'v-bind:key' directives錯誤的解決辦法

語法錯誤提示:vue

[vue-language-server] Elements in iteration expect to have 'v-bind:key' directives.
 編輯器

百度了一下,Vue 2.2.0+的版本里,當在組件中使用v-for時,key是必須的。spa

更改vetur配置            vscode->首選項->設置->搜索(vetur)code

"vetur.validation.template": true,server

改爲:falseit

若是是新版的vscode,找到  vetur.validation.template  前面的勾選去掉重啓編輯器便可io

相關文章
相關標籤/搜索