快速在vue3.0 中创建vue文件(快捷键)

 VScode》文件》首选项》用户片段》vue.json(Vue)

快速在vue3.0 中创建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 快速创建

上一篇:vue.json加ts


下一篇:vue3 tsx render用法