获得徽章 15
- 各大站通用首页变灰代码:
依次排序:百度、淘宝(京东)、网易云音乐、360首页、腾讯网、掘金、CSDN、中国中央政府网、国务院新闻办公室。26189 - vscode 中写react的时候,直接输入标签名称然后按tab键不会自动补全。解决方法,在vscode的settings中添加以下代码即可。
```
"emmet.includeLanguages": { "javascript": "javascriptreact" }, "emmet.triggerExpansionOnTab": true,
```
vscode 配置eslint保存自动修复
```
// 点击保存时,根据 eslint 规则自定修复,同时集成 prettier 到 eslint 中
"prettier.eslintIntegration": true,
// 保存自动修复
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
```展开评论15 - 分享下我很喜欢的VScode下的代码片段
点击做左上角文件 => 首选项 => 用户片段,添加
{
"Print to console": {
"prefix": "csl",
"body": [
"console.log($1);"
],
"description": "Log output to console"
},
"Print to if": {
"prefix": "if",
"body": [
"if($1){}"
],
"description": "Log output to if"
},
"Print to for with length": {
"prefix": "forl",
"body": [
"for (let i = 0; i < $1.length; i++) {",
" ",
"}"
],
"description": "Log output to if"
},
"Print to Multi-line comments": {
"prefix": "///",
"body": [
"\/**",
" * $1",
" **\/"
],
"description": "Log output to console"
}
}
这样你想输入console.log()的时候,只需要输入csl后敲击Tab就可以快速输出你定义的模板代码啦展开124