vetur插件提示 [vue-language-server] Elements in iteration expect to have 'v-bind:key' directives错误的解决办法

错误提示:[vue-language-server] Elements in iteration expect to have 'v-bind:key' directives.

使用VS Code 出现如下问题,如图


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

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


改成:false

最终效果


猜你喜欢

转载自blog.csdn.net/weixin_37404604/article/details/80245408