vscode格式话代码:ctrl+shift+f,
图一
vscode中的文件->首选项->设置->工作区->setting.json
{
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline",
"wap_line_length": 220,
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 220,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
}
{
图二