vscode自动生成vue模板教程

vscode自动生成vue模板步骤

step1:
文件-首选项-用户代码片段,输入vue,点击enter后进入vue.json文件,将下方代码完全覆盖掉以前内容,保存

step2:测试
新进test.vue文件,在vue文件中输入vh,点击enter就能自动生成模板了,如果想调整模板内容,在vue.json中修改

{
	"Print to console": {
	
		"prefix": "vh",
	
		"body": [
	
		"<template>",
	
		" <div>$0</div>",
	
		"</template>",
	
		"",
	
		"<script>",
	
		"export default {",
	
		"  data () {",
	
		"    return {",
	
		"    }",
	
		"  }",
		"}",
	
		"",
	
		"</script>",
	
		"<style scoped>",
	
		"</style>",
	
		"",
	],
	
		"description": "Log output to console"
		}
	}

  

 

posted @ 2020-06-29 13:18  跟着阿笨一起玩.NET  阅读(876)  评论(0编辑  收藏  举报