自定义vue模板(name默认是文件名)

左下角找设置里面的用户代码片段

在这里插入图片描述

然后找到这个文件

在这里插入图片描述

用下面的模板替换即可

{
    
    
	"Print to console": {
    
    
        "prefix": "vue",
        "body": [
			"<template>",
			"    <div>",
			"",
			"    </div>",
			"</template>",
			"",
			"<script>",
			"    export default {",
			"      name: '$TM_FILENAME_BASE',",              
			"",
			"    }",
			"</script>",
			"",
			"<style scoped>",
			"",
			"</style>"
        ],
        "description": "Log output to console"
    }
}

在这里插入图片描述
over!!!

猜你喜欢

转载自blog.csdn.net/weixin_45773503/article/details/113748647