设置-设置-右上角有个类似文件的东西,点开
{
"workbench.iconTheme": "vscode-icons",
"[vue]": {
"editor.defaultFormatter": "yoyo930021.vuter"
},
"vetur.format.defaultFormatterOptions": {
"wrap_attributes": "force-aligned",
"js-beautify-html": {
// - force: 对除第一个属性外的其他每个属性进行换行。
// - force-aligned: 对除第一个属性外的其他每个属性进行换行,并保持对齐。
// - force-expand-multiline: 对每个属性进行换行。
// - aligned-multiple: 当超出折行长度时,将属性进行垂直对齐。
"wrap_attributes": "force-aligned",
// #vue组件中html代码格式化样式,可选
"wrap_line_length": 200,
"end_with_newline": false,
"semi": true,
"singleQuote": false
},
"prettier": {
"semi": false, // 末尾分号
"singleQuote": true, // 双引号变成单引号
"trailingComma": "none" // 禁止随时添加逗号
}
}
}
vscode格式化代码,
最新推荐文章于 2024-03-21 10:43:15 发布