1. 安装vscode,官网地址
2.安装一个插件,识别vue文件
插件库中搜索Vetur,下图中的第一个,点击安装(Install)

3.新建代码片段
点击Code(代码)-Preferences(首选项)-User Snippers(用户代码片段)
4. 搜索框中输入:vue.json.
- 如果可以搜到vue.json,请把下列代码粘贴进该文件中。
{ "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>\n", " </div>", "</template>\n", "<script>", " export default {", " data () {", " return {\n", " }", " },", " components: {\n", " }", " }", "</script>\n", "<style>\n", " ", "</style>", "$2" ], "description": "Log output to console" } }