vscode custom template code vue

 

 

File --- "preference -" user Snippets-- "Search html.json edit content by adding the following custom code

"HTML5-View": {
    "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": "vue quickly create templates written in html5"
}

After the new html file input: vue press tab lies from Custom Code  

Guess you like

Origin www.cnblogs.com/benjamin77/p/11750108.html