使用vscode格式化文档的时候会出现这种情况
文件 -> 首选项 -> 设置 -> 搜索vetur -> 在setting.json中编辑。添加一下代码:
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {"js-beautify-html": {"wrap_line_length": 160,"wrap_attributes": "aligned-multiple","end_with_newline": false},"prettyhtml": {"printWidth": 100,"singleQuote": false,"wrapAttributes": false,"sortAttributes": false}
},
格式化后: