创建模板
2019-07-01 本文已影响0人
兰为鹏
1.file->prefrence->User snippets
- 所有的代码片段需要用""或''包裹
- \t表示制表符>
- 空的一行必须用''或""包裹
- 2代表按下tab后光标第二次出现的位置
5、prefix 是该片段的名字
6、description 是该片段的描述
{
"creat a canvas template": {
"scope": "javascript,html",
"prefix": "vh", //片段名字
//片段代码都在body里
"body": [
"<!DOCTYPE html>",
"<html lang=\"en\">",
"",
"<head>",
"\t<meta charset=\"UTF-8\">",
"\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
"\t<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
"\t<title>Document</title>",
"<script src=\"./lib/vue-2.4.0.js\" ></script>",
"</head>",
"",
"<body>",
"\t<div id=\"app\"></div>",
"\t<script>",
"\tvar vm = new Vue({",
"\t\tel: '#app',",
"\t\tdata: {},",
"\t\tmethods: {}",
"\t});",
"\t</script>",
"</body>",
"</html>",
"$2"
],
"description": "创建vue模板" //该片段的描述
}
}