1,设置->搜索vetur.format.defaultFormatter.html-> 选择js-beautify-html
2.打开文件 首选项 设置 点击右上角的文档图标 随便找个地儿加上这段代码 "vetur.format.defaultFormatterOptions": { "js-beautify-html": { "wrap_line_length": 120, "wrap_attributes": "auto",//代码换行模式 auto force force-aligned force-expand-multiline "end_with_newline": false }}, 保存就好了