vscode 用户代码片段

发布时间 2023-08-28 15:59:35作者: 清水渡白吟堤你如风

1. vscode 左下角找到管理图标
2. 找到“用户代码片段”

3. 搜索“vue.json”或者“vue”

4. 配置代码模版

"Print to Vue3": {
		"prefix": "vue3",
		"body": [
			"<template>",
			"  <div>",
			"",
			"  </div>",
			"</template>",
			"",
			"<script setup lang='ts'>",
			"import { ref, reactive } from 'vue'",
			"",
			"</script>",
			"",
			"<style scoped>",
			"",
			"</style>"
		],
		"description": "output to vue3 template"
},