html-snippet

{
    // 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>",],
    },

}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容