v-for 在 VSCode 中出现 Elements in iteration expect to have 'v-bind:key' directives.
在 VSCode 中编辑代码时,在有 v-for 的语句下面有一条红色波浪线,鼠标放上去有提示 Elements in iteration expect to have 'v-bind:key' directives.。代码如下:
<p v-for="line in lines">
{{line}}
</p>
搜索了一下找到了这个讨论https://github.com/vuejs/vetur/issues/261。
原来这是 ESLint 的一个 feature,但是我也没启用 ESLint 呀。原来是因为 vetur(Vue.JS 的高亮插件)里自带了 ESLint。
解决方法是打开 VSCode 的 Preferences 里的 Settings,搜索 ESLint,在 Vetur › Validation: Template 下面取消选中 Validate vue-html in <template> using eslint-plugin-vue 即可。
v-for 在 VSCode 中出现 Elements in iteration expect to have 'v-bind:key' directives.的更多相关文章
- vue使用v-for时vscode报错 Elements in iteration expect to have 'v-bind:key' directives
vue使用v-for时vscode报错 Elements in iteration expect to have 'v-bind:key' directives Vue 2.2.0+的版本里,当在组件 ...
- 遇到Elements in iteration expect to have 'v-bind:key' directives.' 这个错误
解决方式一:更改VS Code编辑器的vetur配置 错误提示: [vue-language-server] Elements in iteration expect to have 'v-bind: ...
- Elements in iteration expect to have 'v-bind:key' directives.' 提示错误如何解决?
在学习vue过程中遇到Elements in iteration expect to have 'v-bind:key' directives.' 这个错误,查阅资料得知Vue 2.2.0+的版本里, ...
- vue开发中v-for在Eslint的规则检查下出现:Elements in iteration expect to have 'v-bind:key' directives
在使用VScode编辑器vue开发过程中,v-for在Eslint的规则检查下出现报错:Elements in iteration expect to have 'v-bind:key' direct ...
- vue的开发中v-for报错 [vue/require-v-for-key] Elements in iteration expect to have 'v-bind:key' directives.
用的VS Code 工具,安装了vetur插件,报错了如下 [eslint-plugin-vue] [vue/require-v-for-key] Elements in iteration expe ...
- [vue/require-v-for-key] Elements in iteration expect to have 'v-bind:key' directives.
使用VScode开发vue中,v-for在Eslint的规则检查下出现报错:如下Elements in iteration expect to have ‘v-bind:key’ directives ...
- 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.Renders the ...
- Elements in iteration expect to have 'v-bind:key' directives错误的解决办法
一.错误如下 [eslint-plugin-vue][vue/require-v-for-key]Elements in iteration expect to have 'v-bind:key' d ...
- 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.Re ...
随机推荐
- 校园生活app结对开发第一天
今天刚开始开发,要安装android studio及熟悉软件操作
- ASP.NET应用程序服务器集群方案
本文采用Nginx来实现ASP.NET程序集群化. 准备环境 首先准备Nginx环境,Windows版本下载链接:http://nginx.org/en/download.html 解压后文件格式如下 ...
- SpringBoot 2.0 mybatis mapper通用类
<!---mybatis通用类包含mybatis和连接池 mybatis和连接池就不需要引入--> <dependency> <groupId>tk.mybatis ...
- SpringBoot学习笔记(一)入门
1.重新认识Spring 假如临危受命需要开发一个简单的基于Spring的web程序,你该做什么?可能想到一些基本的需要: 项目结构,其中可选择使用Maven或Gradle构建.其中包含例如Sprin ...
- int 与 Integer 的区别
int和Integer的区别 Integer是int的包装类,int则是java的一种基本数据类型 Integer变量必须实例化后才能使用,而int变量不需要 Integer实际是对象的引用,当new ...
- MyDAL - .IsExistAsync() 使用
索引: 目录索引 一.API 列表 .IsExistAsync() 用于 单表 / 多表连接 查询 二.API 单表-便捷 方法 举例 1.单表-便捷, 判断是否存在方法 var date = Dat ...
- ubuntu环境下实现 多线程的socket(tcp) 通信
改改就是个小型局域网聊天 服务器端: // File Name: process_server.c // Author: jiujue // Created Time: 2019年03月10日 星期日 ...
- djangorestframework+vue-cli+axios,为axios添加token作为headers踩坑记
情况是这样的,项目用的restful规范,后端用的django+djangorestframework,前端用的vue-cli框架+webpack,前端与后端交互用的axios,然后再用户登录之后,a ...
- python类的继承、封装和多态
摘自https://www.cnblogs.com/evablogs/p/6724477.html 继承 1 2 3 4 5 6 7 8 class Person(object): def _ ...
- Webdriver之API详解(2)
前言:今天继续上一篇文章https://www.cnblogs.com/linuxchao/p/linuxchao-selenium-apione.html分享selenium' webdriver ...