vscode 格式化时,不想要属性换行。
解决办法:
vscode 软件中找到 文件>首选项>设置
点击图标,切换到代码模式
添加规则
// 禁止代码标签换行开始
"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": "auto",
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
// 禁止代码标签换行结束