1.左下角打开设置
在这里插入图片描述
2.新建全局代码片段
在这里插入图片描述
3.输入名字,名字随意不过最好语意化
在这里插入图片描述

4.创建模版

这里的模版为vue2常用代码片段,稍后会持续更新。

{
	"Print to console": {
		"prefix": "v2", //页面使用时名称
		"body": [
			"<template>",
			"  <div>",
			"",
			"  </div>",
			"</template>",
			"",
			"<script>",
			"export default {",
			"  name:'',"
			"  data() {",
			"    return {",
			"",
			"    }",
			"  },",
			"  mounted() {",
			"",
			"  },",
			"  methods: {",
			"",
			"  },",
			"}",
			"</script>",
			"<style lang='scss' scoped>",
			"",
			"</style>"
		],
		"description": "Log output to console"
	}
}

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐