美文网首页
html-snippet

html-snippet

作者: 王帅同学 | 来源:发表于2021-10-11 17:39 被阅读0次
{
    // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and 
    // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
    // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
    // same ids are connected.
    // Example:
    "Print to tp": {
        "prefix": "tp",
        "body": [
            "type=\"text/html\"",
        ],
        "description": "Log output to type"
    },
    "Print to sc": {
        "prefix": "sc",
        "body": [
            "<script>",
            "$1",
            "</script>",
        ],
        "description": "Log output to sc"
    },
    "html":{
        "prefix": "html",
        "body": ["<!DOCTYPE html>",
            "<html lang=\"zh-CN\">",
            "<head>",
            "    <meta charset=\"UTF-8\">",
            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
            "    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
            "    <title>$1</title>",
            "</head>",
            "<body>",
            "</body>",
            "<script>",
            "$2",
            "</script>",
            "</html>",],
    },
    "vueall":{
        "prefix": "vue",
        "body": ["<!DOCTYPE html>",
            "<html lang=\"en\">",
            "<head>",
            "    <meta charset=\"UTF-8\">",
            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
            "    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
            "    <title>$1</title>",
            "    <script src=\"https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.js\"></script>",
            "</head>",
            "<body>",
            "    <div id=\"app\">",
            "    </div>",
            "    <script>",
            "        let vm = new Vue({",
            "           el:'#app',",
            "           data:{",
            "               $2",
            "           }",
            "       })",
            "    </script>",
            "</body>",
            "</html>",],
    },

}

相关文章

网友评论

      本文标题:html-snippet

      本文链接:https://www.haomeiwen.com/subject/jrtroltx.html