效果:
1、打开vscode
2、输入以下内容:
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length":100,
"wrap_attributes": "auto",
"end_with_newline": true
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"html.format.wrapAttributes": "force"
3、保存,重启vscode