一、錯誤如下
[eslint-plugin-vue]
[vue/require-v-for-key]
Elements in iteration expect to have 'v-bind:key' directives.
[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.
使用VS Code 出現如下問題,如圖

二、解決
在用vscode編寫vue代碼時,因為安裝的有vetur插件,所以當代碼中有v-for語法時,會提示,“Elements in iteration expect to have 'v-bind:key' directives.”這個錯誤
這是ESLint的功能,對vue進行了eslint檢查。那么我們就把eslint對該插件的檢查關閉,
更改vetur配置 vscode->首選項->設置->搜索(vetur)
把 "vetur.validation.template": true 改成 false
保存,我們再看一下vue文件,發現不報錯了。