vscode中vue的文件模板

{
    // Place your snippets for vue 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 console": {
    //  "prefix": "log",
    //  "body": [
    //      "console.log('$1');",
    //      "$2"
    //  ],
    //  "description": "Log output to console"
    // }
    "Vue App Template": {
        "prefix": "vueAppTemplate(TypeScript/stylus)",
        "body": [
            "<template>\n\t<div class=\"app\">\n\t\t<router-view />\n\t</div>\n</template>\n\n",
            "<script lang=\"ts\">\nimport { Component, Vue } from 'vue-property-decorator';\n\n@Component({\n\tcomponents: {}\n})\nexport default class App extends Vue {\n$0\n}\n</script>\n\n",
            "<style lang=\"stylus\" scoped>\nhtml, body\n\twidth 100%\n\theight 100%\n\tpadding 0\n\tmargin 0\n\tborder 0\n\tbox-sizing border-box\n\tfont-size 18px\n\tline-height 1\n\tfont-family \"Helvetica Neue\"\n\t-webkit-font-smoothing antialiased\n\t-moz-osx-font-smoothing grayscale\n\toverflow hidden\n",
            "*, ::before, ::after\n\tbox-sizing inherit\n.app\n\twidth 100%\n\theight 100%\n</style>"
        ],
        "description": "生成 VueApp(TypeScript/stylus) 文件的結(jié)構(gòu)"
    },
    "Vue Template": {
        "prefix": "vueTemplate(TypeScript/stylus)",
        "body": [
            "<template>\n\t<div>\n\n\t</div>\n</template>\n\n",
            "<script lang=\"ts\">\nimport { Component, Vue } from 'vue-property-decorator';\n\n@Component({\n\tcomponents: {}\n})\nexport default class ${1:ClassName} extends Vue {\n$0\n}\n</script>\n\n",
            "<style lang=\"stylus\" scoped>\n\n</style>"
        ],
        "description": "生成 Vue(TypeScript/stylus) 文件的結(jié)構(gòu)"
    }
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容