1.选择File中的Preferences中的User Snippets
2.搜索vue,选择vue.json
在这里插入图片描述
3.将下面内容复制到vue.json的大括号中,保存

"Print to console": {        
     "prefix": "vue",        
     "body": [          
         "<template>",          
         "   <div></div>",          
         "</template>",          
         "",
         "<script>",          
         "export default {",
         "   data () {",
         "      return {",
         "",
         "      };",
         "   },",
         "",
         "   components: {},",
         "",
         "   computed: {},",
         "",
         "   methods: {}",
         "}",
         "</script>",
         "<style lang='css' scoped>",
         "",
         "</style>"
   ],
   "description": "Log output to console"
}

4.测试:新建一个vue文件,输入vue按Tab键生成vue模板(模板的内容可以根据自己的需要在上面的粘贴的代码中做调整)如下:
在这里插入图片描述
在这里插入图片描述

Logo

前往低代码交流专区

更多推荐