vscode自定义vue模板代码

vue

File---》preference --》user Snippets--》搜索html.json 编辑 加入以下自定义代码内容

"Html5-Vue": {

"prefix": "vue",

"body": [

"<!DOCTYPE html>",

"<html lang=\"zh-CN\">\n",

"<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>",

"\t<script src=\"../lib/vue-2.5.17/vue.js\"></script>",

"</head>\n",

"<body>",

"\t<div id=\"app\">$1</div>\n",

"\t<script>",

"\t\tvar vm = new Vue({",

"\t\t\tel: '#app',",

"\t\t\tdata: {},",

"\t\t\tmethods: {}",

"\t\t});",

"\t</script>",

"</body>\n",

"</html>"

],

"description": "快速创建在html5编写的vue模板"

}

新建html文件后  输入:vue 然后按tab 就出来自定义代码  

以上是 vscode自定义vue模板代码 的全部内容, 来源链接: utcz.com/z/379788.html

回到顶部