vscode新建vue生产vue的模版


vscode新建vue文件后,生成vue的模版

点击设置,选择用户代码段,输入vue回车,生成vue.json的全局配置

然后配置模版就可以

{ // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } "Print to console": { "prefix": "vue",//此处关系到你的快捷单词 "body": [ "", "", "", "", "" ], "description": "Log output to console" } }     配置之后,新建vue文件,在文件中输入vue,点击回车,就可以生成模版的vue内容,注意vscode的右下角的语言修改为vue才会成功。