vscode中自定义Vue模板

目标:输入vue之后能快速创建vue模板

vscode中自定义Vue模板_第1张图片

实现:

1. 文件 ->  首选项 ->用户代码片段

2. 搜索html.json

vscode中自定义Vue模板_第2张图片

3. 复制下方代码将原有代码全部覆盖

{
	// Place your snippets for html 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": "vue",
	    "body": [
	        "",
			"",

"",
    "\t",
    "\t",
    "\tDocument",
"",
"",
    "\t
", "\t", "\t", "", "" ], "description": "vue模板" } }

vscode中自定义Vue模板_第3张图片

4. ctrl + s保存一下,测试一下,没问题

vscode中自定义Vue模板_第4张图片

 

你可能感兴趣的:(前端成长之路)