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",按下回车键,自动生成模板

相关推荐
frjc36 分钟前
如何在 IDEA 中打开并运行已有Java项目
java·ide·intellij-idea
晚风叙码5 小时前
Linux(三)apt/yum 软件安装与 vim 编辑器入门指南
linux·编辑器·vim
民乐团扒谱机6 小时前
【超详细】PyQt6 实现 AU 风格波形图编辑器:多级缩放与采样点逐级渲染,附全过程代码
开发语言·python·编辑器·pyqt·audition·时域·频谱图
CounterGlew5116 小时前
Vscode通过ssh链接autodl云服务器并配置codex
运维·服务器·vscode
女神下凡7 小时前
PyCharm 2026破解激活
ide·python·pycharm
谁刺我心7 小时前
【vscode问题】远程remote cpptools导致linux板子cpu爆炸问题
ide·vscode·编辑器
LaughingZhu1 天前
Product Hunt 每日热榜 | 2026-09-02
java·ide·intellij-idea
进击的蜗牛Eric1 天前
VSCode Server手动安装指南(简洁版)
vscode
小芒果_011 天前
从0到1,将pycharm上的项目上传到github
ide·pycharm·github
xx~t2 天前
嵌入式——Linux软件编程——网络1
linux·c语言·网络·vscode·网络协议