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

相关推荐
ITKEY_10 分钟前
emacs 文件管理Dired, the Directory Editor
linux·编辑器·emacs
1024奇点9 小时前
【仓颉语言入门 · 第二篇 第 22 课】
开发语言·ide·开源
Solange__21 小时前
图片转3D导出GLB、FBX还是OBJ?按5类任务比较材质、动画与可编辑性
人工智能·3d·ai·自然语言处理·编辑器·blender·材质
techpupil1 天前
IDEA基础配置及开发基础插件
java·ide·intellij-idea
赵庆明老师1 天前
Android Studio Google源代理配置
android·ide·android studio
2501_916008891 天前
iOS App 图标、启动屏和多语言搭配 方法,上架前使用KXBuild一次做好 App 图标
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
2501_915918411 天前
iOS 推送通知怎么实现,从 APNs p8 密钥到 iOS 真机收到第一条推送
vscode·ios·objective-c·个人开发·swift·敏捷流程
ThatMonth1 天前
vscode 编辑器怎么打开多页签,而不是覆盖已有的页签
编辑器
广东帝工2 天前
双预警防线,筑牢智慧航道水上安全屏障
编辑器
sunshine22 girl2 天前
copilot vscode 使用技巧
人工智能·vscode·编辑器