文件->首选项->设置->
找到setting.json 替换以下内容.
{
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 3000,
"files.associations": {
"vue-html": "html",
"vue": "html"
},
"editor.tabSize": 4,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"editor.detectIndentation": false,
"window.zoomLevel": 0,
"npm.enableRunFromFolder": true,
"vetur.format.options.tabSize": 4,
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "auto"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
}
}