IDE:vscode的vue3模板

快捷键打开配置选项:ctrl + shift + p

选择配置文件:Snippet: Configure Snippets

javascript 复制代码
{
	// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }

	
  "Vue 3 Setup Template": {
	// 快捷键设置。
    "prefix": "vue3",

    "body": [
		"<template>",
		"    <div class=\"${TM_FILENAME_BASE}\">",
		"        $0",
		"    </div>",
		"</template>",
		"",

		"<script lang=\"ts\">",
		"    export default {",
		"        name: 'MODULE NAME'",
		"    }",
		"",
		"</script>",
		"",

		"<script lang=\"ts\" setup>",
		"    import { ref } from 'vue'",

		"    $1",
		"</script>",
		"",

		"<style scoped>",
		"",
		"</style>"
    ],

    "description": "Vue 3 Composition API"
  }

}
相关推荐
এ慕ོ冬℘゜18 分钟前
ES Promise.all/ Promise.race
前端·javascript·elasticsearch
NamoAmitabha12830 分钟前
安装“编译器环境”(Android Studio)--deepseek--Cocos --Creator3.8.8
android·ide·android studio
只睡四小时1 小时前
端侧推理:face-api.js 首屏 92% 是白下载的
开发语言·javascript·人脸识别·ecmascript·tensorflow.js·face-api.js·端侧推理
用户83134859306982 小时前
Vue3 v-for:常用用法与开发高频坑点
前端·javascript·vue.js
Funlang2 小时前
fun-ui 开源:把浏览器界面接回来
前端·javascript
2603_965896622 小时前
CSS BEM 命名规范|组件化样式分层权威指南
前端·javascript·css
忆挽篱笙歌3 小时前
进程替换函数与shenll命令行解释器
前端·javascript·算法
小冯不疯3 小时前
688 / 拼多多 / 淘特三类供货链路:从采购单到应付凭证的 4 段对账
javascript
moshuying3 小时前
DeppInfer系列之 - 矩阵、注意力与 GPU:拆解 DeepGEMM 与 FlashMLA
前端·javascript·面试
Jack N5 小时前
【Strapi 系列之五】前端怎么接?Next.js + Tailwind 拉取 Strapi 数据(含代码)
开发语言·前端·javascript·strapi