vscode自定义vue模板代码

独自空忆成欢 提交于 2021-01-10 12:57:09

 

 

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 就出来自定义代码  

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!