vscode vue添加代码片段

vscode vue添加代码片段

#第一步 : 进入vs code主界面–>使用快捷键“ctrl + shift + p”:

在这里插入图片描述
选项Configure User Snippets假如不会出现在第一行,这时候你可以在搜索栏输入:Configure User Snippets,然后就可以找到这个选项了。

#第二步 选择或创建vue.json

在这里插入图片描述
在这里插入图片描述
#第三步:配置代码

"Print to console": {
		"prefix": "vue",
		"body": [
			"<template>",
			"  <div>",
			"  </div>",
			"</template>",
			"",
			"<script>",
			"  export default {",
			"  data() {",
			"    return {",
			"",
			"    };",
			"  },",
			"  created() {",
			"",
			"  },",
			"  mounted() {",
			"",
			"  },",
			"  methods: {",
			"",
			"  },",
			"}",
			"</script>",
			"",
			"<style lang='scss' scoped>",
			"$4",
			"</style>"
		],
		"description": "Log output to console"
	}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/z1712636234/article/details/105975952
今日推荐