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 ...
随机推荐
- EasyUI List<T>转tree数据格式
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using S ...
- HTML5支持服务器发送事件(Server-Sent Events)-单向消息传递数据推送(C#示例)
传统的WEB应用程序通信时的简单时序图: 现在Web App中,大都有Ajax,是这样子: HTML5有一个Server-Sent Events(SSE)功能,允许服务端推送数据到客户端.(通常叫数据 ...
- C#的Lock
有时候在编写线程并发的时候需要考虑异步和同步的问题.有些资源只能是一个线程访问,其他的线程在这个线程没有释放资源前不能访问.类似于操作系统中临界资源的访问.C#Lock包裹的代码块具有原子操作的特性( ...
- 禁用事件event默认行为
在大多数情况下,为事件处理函数返回false,可以防止默认的事件行为.例如,默认情况下点击一个<a>元素,页面会跳转到该元素href属性指定的页. js中return false作用一般是 ...
- 【Android】用Cubism 2制作自己的Live2D——官方App样例源码学习(2)!
前言- 明确了项目目录的结构,但是结构什么的也太"抽象"了. 本篇开始上代码! 模型的绘制- 前几天的学习中,live2d的绘制有了一些了解了,在Android端使用OpenGL ...
- 一起学Android之ProgressBar
本文简述在Android开发中进度条(ProgressBar)的常见应用,仅供学习分享使用. 概述 在Android开发中,进度条的使用场景有很多,如播放电影时可拖动的观看进度条,评分时使用的评分条, ...
- IntentService原理分析
IntentService是一个异步处理请求的服务,通过Context#startService(Intent)可以将请求发送给IntentService,IntentService在工作线程中依次串 ...
- 猴子选大王 (约瑟夫环)(c#)
猴子选大王问题: 一堆猴子都有编号,编号是1,2,3 ...m ,这群猴子(m个)按照1到m的顺序围坐一圈, 从第1开始数,每数到第n个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子, ...
- SQL SERVER-创建Alwayson
Failover Custer(AlwaysOn) 创建Failover Cluster和启动AlwaysOn 创建Failover Cluster 节点的个数要是奇数如果是偶数则要加一个仲裁磁盘.在 ...
- win10 桌面设置为远程桌面
查看方法: 1.点击桌面“计算机”,右键,点击属性. 2.在计算机属性系统窗口中点击“远程设置”. 3.在“系统属性”对话框中远程协助勾选“允许远程协助连接这台计算机”. 4.在“远程协助”点击“高级 ...