VScode》文件》首选项》用户片段》vue.json(Vue)
vue.json配置:
{
"Print to console":{
"prefix": "vuec",
"body": [
"<template>",
" <div>",
" </div>",
"</template>",
"",
"<script>",
"import { defineComponent } from 'vue'",
"export default defineComponent ({",
" name:'',",
" components:{},",
" props:{},",
" setup(props, ctx){",
" return {",
" }",
" },",
"})",
"</script>",
"",
"<style scoped>",
"</style>"
],
"description": "A vue file template"
}
}
配置完成之后,创建一个.vue文件,输入vuec 快速创建