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"
  }

}
相关推荐
SilentSamsara13 小时前
标准库精讲:collections/itertools/functools/pathlib 实战
开发语言·vscode·python·青少年编程·pycharm
ZC跨境爬虫14 小时前
跟着 MDN 学 HTML day_2:(表单分组与高级输入控件实战)
前端·javascript·css·ui·html
千寻girling14 小时前
滑动窗口刷了快一个月(26天)了 , 还没有刷完. | 含(操作系统学什么的Java 后端)
java·开发语言·javascript·c++·人工智能·后端·python
一袋米扛几楼9815 小时前
【报错问题】彻底解决 TypeScript 报错 TS2769: No overload matches this call (JWT 篇)
linux·javascript·typescript
牧码岛15 小时前
Web前端之JavaScrip中的Array、Object、Map和Set详解
前端·javascript·web·web前端
逐星ing15 小时前
IDEA 无法识别 `mvn install` 最新 SNAPSHOT 依赖的根因与完整解决方案
java·ide·intellij-idea
533_16 小时前
[pinia] vue3中监听pinia值的变化
前端·javascript·vue.js
AlenLi16 小时前
JavaScript - 相对实用的Axios二次封装
前端·javascript
一叶飘零晋16 小时前
【(二)Electron 使用之常用技巧】
javascript·electron·ecmascript
代码的奴隶(艾伦·耶格尔)16 小时前
claude codex(deepseep-v4-pro)
ide