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


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

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




保存后结果


猜你喜欢

转载自blog.csdn.net/czp555/article/details/80269408
今日推荐