文件→首选项→用户片段→搜索vue→找到vue.json→粘贴这段代码
{
"Print to console Vue 3": {
"prefix": "vue3",
"body": [
"<script>",
"</script>",
"",
"<template>",
" <div></div>",
"</template>",
"",
"<style scoped lang='less'>",
"</style>",
],
"description": "Log output to console"
},
"Print to console Vue 2": {
"prefix": "vue2",
"body": [
"<!-- $1 -->",
"<template>",
" <div class='$2'>$5</div>",
"</template>",
"",
"<script>",
"export default {",
" components: {},",
" data() {",
" return {",
"",
" };",
" },",
" computed: {},",
" watch: {},",
" methods: {",
"",
" },",
" created() {",
"",
" },",
" mounted() {",
"",
" },",
"}",
"</script>",
"<style lang='scss' scoped>",
" //@import url($3); 引入公共css类",
"$4",
"</style>"
],
"description": "A vue file template"
}
}