Before and after comparison
One, plug-in
Install Beautify and Vetur plugins
Two, edit the Beautify configuration file
Add "vue" in html
"beautify.language": {
"js": {
"type": [
"javascript",
"json"
],
"filename": [
".jshintrc",
".jsbeautify"
]
},
"css": [
"css",
"scss"
],
"html": [
"htm",
"html",
"vue" //在这里加上vue
]
}
3. Set the Beautify plug-in as the default formatting code plug-in
Shift+Alt+F format the code happily