vsCode中vue用户片段(常用)

"Create vue template": {
        "prefix": "vue",
        "body": [
            "<template>",
            "\t<div>",
                    "\t\t$0",
            "\t</div>",
            "</template>\n",

            "<script>",
            "import {mapActions,mapGetters} from \"vuex\"",
            "export default {",
                "\tdata() {",
                    "\t\treturn {\n",

                    "\t\t};",
                            "\t},",
                    "\tcomponents:{\n",

                    "\t\t},",
                    "\tcomputed:{",
                        "\t\t...mapGetters({\n",
                    
                        "\t\t}),",
                    "\t},",
                    "\tmethods:{",
                        "\t\t...mapActions({\n",
                    
                        "\t\t}),",
                    "\t},",
                    "\tmounted(){\n",
                    
                    "\t},",
                    "};",
            "</script>\n",

            "<style lang='less' scoped>\n",

            "</style>"
        ],
        "description": "Create vue template"
    },

带有空格,换行 还有 光标起始位”$0“

posted @ 2021-06-29 22:39  花月  阅读(439)  评论(0)    收藏  举报