在应用商店搜索扩展并安装:stylelint-plus、Vetur、Beautify
"stylelint.autoFixOnSave": true, // 保存自动格式化 "vetur.format.defaultFormatter.html": "js-beautify-html", // 格式化模板 "vetur.format.defaultFormatterOptions": { "js-beautify-html": { "wrap_attributes": "force-aligned", // 第一个属性后开始折行,并对齐 },
在 vscode 中安装插件:stylelint-plus
当然也可以选择普通的 stylelint 插件,不过 plus 版本有保存即 fix 的功能
使用
css 格式化:ctrl + s 自动修复
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c59370.shtml