在使用vs开发vue中经常新建vue文件进行模块开发,新建文件结构着实痛苦

于是百度配置一下自己的vs编辑器:
1.点击vs左下角设置选择用户代码片段
2.输入vue并按下回车,将下边代码复制粘贴到vue.json进行保存 

{
	"Print to console": {
		"prefix": "vue",
		"body": [
			"<template>",
			"  <div>",
			"    $0",
			"  </div>",
			"</template>",
			"",
			"<script>",
			"",
			"  export default {",
			"    name:'',",
			"    props:[''],",
			"    data () {",
			"      return {",
			"",
			"      };",
			"    },",
			"",
			"    components: {},",
			"",
			"    computed: {},",
			"",
			"    beforeMount() {},",
			"",
			"    mounted() {},",
			"",
			"    methods: {},",
			"",
			"    watch: {}",
			"",
			"  }",
			"",
			"</script>",
			"<style lang='' scoped>",
			"",
			"</style>"
		],
		"description": "Log output to console"
	}
}

然后在新建的vue文件中输入vue按下回车,即可

Logo

前往低代码交流专区

更多推荐