您正在查看: Other 分类下的文章

chrome清除缓存、不使用缓存而刷新快捷键

Ctrl+Shift+Del 清除Google浏览器缓存的快捷键
Ctrl+Shift+R 重新加载当前网页而不使用缓存内容
Ctrl + F5 去除缓存+刷新快捷键

yarn错误The engine "node" is incompatible with this module

 yarn config set ignore-engines true

WSL 设置默认版本

查看已安装的WSL版本,cmd中执行

wslconfig /l

设置默认版本

wslconfig /setdefault Linux_Name


再次查看

已修改成功

Elements in iteration expect to have 'v-bind:key' directives错误的解决办法

在用vscode编写vue代码时,因为安装的有vetur插件,所以当代码中有v-for语法时,会提示,Elements in iteration expect to have 'v-bind:key' directives.这个错误
这是ESLint的功能,对vue进行了eslint检查。那么我们就把eslint对该插件的检查关闭,

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

"vetur.validation.template": true  //改成  false

保存,我们再看一下vue文件,发现不报错了。

Vue vscode 格式化配置

打开vscode 插件,找到已安装的 Vetur(提前安装),点击设置

会自动打开settings.json文件,编辑内容

"vetur.format.defaultFormatterOptions": {
    "prettyhtml": {
        "printWidth": 300, // No line exceeds 300 characters
        "singleQuote": false // Prefer double quotes over single quotes
    }
}

然后保存,就可以在打开Vue文件的编辑框中快乐的右键格式化文档了。