VS code 使用技巧

VS code使用經驗彙總

模板設置

vscode的模板設置在代碼段裏面設置步驟如下:
crtl+shift+p ,然後輸入snippet,在裏面查找vue(例子是vue),然後就可以在裏面輸入代碼段了
vue的模板文件爲:

{

    "Print to console": {

        "prefix": "vue",

        "body": [

            "<template>",

            " <div class=\"page\">\n",

            " </div>",

            "</template>\n",

            "<script type=\"text/ecmascript-6\">",

            " export default {",

            "   data() {",

            "     return {\n",

            "     }\n",

            "   },",

            "   components: {\n",

            "   }",

            " }",

            "</script>\n",

            "<style scoped lang=\"stylus\">\n",

            " ",

            "</style>",

            "$2"

        ],

        "description": "Log output to console"

    }

}

保存設置後,新建一個vue後綴名的文件,在文件裏面輸入vue,然後按tab鍵即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章