Skip to content

代码片段

vue3

js
{
 "vue3 template": {
    "scope": "vue", //指定文件类型,只有.vue文件可以触发
    "prefix": "v3", //自定义触发指令,我这里设置输入v3按下回车即可快速生成模板
    "body": [
      //定义模板内容
      "<script setup lang=\"ts\">",
      "  ",
      "</script>",
      "",
      "<template>",
      "  $1",
      "</template>",
      "",
      "<style scoped>",
      "</style>",
      "",
    ],
    "description": "vue3 tpl"
  }
}

react

js
{
  "react template": {
		"prefix": "rfc",
		"body": [
			"export default function $TM_FILENAME_BASE() {",
			"  return $1",
			"}"
		],
		"description": "react tpl"
	}
}

Released under the MIT License.