vscode 快速生成vue 格式

1.用快捷Ctrl + Shift + P唤出控制台

输入"Snippets"并选择 Snippets: Configure User Snippets

2.输入vue,选中vue.json

vs code自动生成vue.json文件

3.在 vue.json 中添加模板

复制代码
{
	"Print to console": {
			"prefix": "vue2",
			"body": [
					"<template>",
					"  <div></div>",
					"</template>",
					"",
					"<script>",
					"export default {",
					"  components: {},",
					"  props: {},",
					"  data() {",
					"    return {",
					"    };",
					"  },",
					"  watch: {},",
					"  computed: {},",
					"  methods: {},",
					"  created() {},",
					"  mounted() {}",
					"};",
					"</script>",
					"<style lang=\"less\" scoped>",
					"</style>"
			],
			"description": "A vue file template"
	}
}

4.新建一个 vue 文件,输入"vue2",按下回车键,自动生成模板

相关推荐
love530love28 分钟前
用自然语言让 AI Agent 卸载软件 —— 以卸载 Visual Studio 2026 为例
ide·人工智能·windows·agent·visual studio·ai agent·marvis
落寞的电源6 小时前
使用Visual Studio SDK制作GLSL词法着色插件
ide·visual studio
fenghx2588 小时前
仅用于个人记录:火狐有网,Vscode的codex连不上
vscode·编辑器
LL3436388 小时前
2026最新5款AI编程工具平替实测|终端与IDE vibe coding迭代优缺点深度对比
ide·ai编程
HhzZzzzz_9 小时前
萨科微slkor2026年7月6日“每日芯闻”。国际芯闻:
人工智能·智能手机·编辑器
00后程序员张9 小时前
iOS 打包方式汇总 从 Xcode Archive 到轻量级工具链的 IPA 构建
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
Balabala噗9 小时前
VScode接入MiniMax流程
ide·vscode·编辑器
诚信定制8391 天前
Typora:一款优雅的跨平台 Markdown 编辑器
编辑器
渣渣盟1 天前
Linux软件管理与编辑器命令速查手册
linux·运维·编辑器
Tian_Hang2 天前
Eclipse Ditto 的权限策略
java·服务器·前端·网络·ide·ubuntu·eclipse