首先点击左下角设置Manage,选择 user snippets, 如果你要创建.html模板,就在弹出窗口中输入html 如果你要创建.vue模板,就在弹出窗口中输入vue 下面的代码是vue的模板,大家自行复制粘贴就好了, 具体每个代码什么意思,可以自己推测出来, 然后保存,新建xx.vue,输入你写的prefix的值。就会出现你想要的模板(请注意双引号)
{
"Print to console": {
"prefix": "vue",
"body": [
"<!-- vue组件 -->",
"<template>",
" <div></div>",
"</template>",
"",
"<script>",
"export default {",
" name:'',",
" data () {",
" return {",
" }",
" },",
" components: {},",
" computed: {},",
" mounted: {},",
" methods: {}",
"}",
"</script>",
"",
"<style lang='less' scoped>",
"</style>"
],
"description": "Log output to console"
}
}