设置—首选项—自定义代码片段
Settings — Users Snippets
html.json
{
"vh": {
"prefix": "vh", // 触发的关键字 输入vh按下tab键
"body": [
"<!DOCTYPE html>",
"<html lang=\"en\">",
"",
"<head>",
" <meta charset=\"UTF-8\">",
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">",
" <meta content=\"yes\" name=\"apple-mobile-web-app-capable\"> ",
" <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
" <title>Document</title>",
" <link rel=\"stylesheet\" href=\"css/font.css\">",
"</head>",
"",
"<body>",
" <div id=\"app\" v-cloak></div>",
" <script src=\"js/vue.min.js\"></script>",
" <script>",
" var app=new Vue({",
" el:'#app',",
" data:{",
" ",
" },",
" mounted: function () {",
" console.log(\"mount之后\");",
" },",
" updated: function () {",
" console.log(\"更新之后\");",
" },",
" methods:{}",
" });",
" </script>",
"</body>",
"",
"</html>",
],
"description": "vh components"
}
}
javascript.json
{
"con":{
"prefix": "con", // 触发的关键字 输入vh按下tab键
"body": [
"console.log();"
],
"description": "console.log"
},
"ajax":{
"prefix":"ajax",
"body":[
"$.ajax({",
"url: MALL_URL+\"goods/category/listcate\" ",
"method:\"POST\"",
"data:JSON.stringify()",
"success:function (res) { ",
" console.log(res);",
" ",
"},",
"error:function(err){",
" console.log(err);",
" ",
"}",
"});",
]
}
}