vs code 在模板中添加template报错

1.vs code  提示如下错误

[vue-language-server] 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 在模板中添加template报错

Vue 2.2.0+的版本里,当在组件中使用v-for时,key是必须的。

更改vetur配置            vscode->文件->首选项->设置->搜索(vetur)


vs code 在模板中添加template报错


保存后结果

vs code 在模板中添加template报错