vscode vue 自動格式化
安裝Prettier和Vetur插件
選擇設置,并且轉到編輯文件。增加如下內容。
{"editor.formatOnSave": true,"editor.defaultFormatter": "esbenp.prettier-vscode","[vue]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"prettier.singleQuote": true,"prettier.semi": false,"prettier.trailingComma": "es5","prettier.arrowParens": "avoid","prettier.endOfLine": "auto","files.associations": {"*.vue": "vue"}
}