vscode vue quickly create a new template

vscode file = "Preferences =" user code snippet = "new global code fragment
 
 
{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<!-- tsx -->",
            "<template>",
            "  <div class=\"package\">\n",
            "  </div>",
            "</template>\n",
            "<script >",
            "// here you can import other files (such as: components, tools js, third-party plug-js, json files, picture files, etc.)"
            "// example: import" Component Name "from" "Component Path" '; "
            "export default {",
            "// import component introduced into the object need to inject in order to use"
            "components: {},",
            "  data() {",
            "Here // store data"
            "    return {\n",
            "    }",
            "  },",
            "// filter",
            "filters: {},",
            "// monitor data attributes similar to the concept of"
            "computed: {},",
            "// monitor data changes in the data"
            "watch: {},",
            "// set of methods"
            "methods: {},",
            "// lifecycle - created (this can access the current instance)"
            "created() {},",
            "// life cycle - the mount is completed (you can access the DOM elements)"
            "mounted() {},",
            "BeforeCreate () {}, // lifecycle - Before creating"
            "BeforeMount () {}, // lifecycle - before mount"
            "BeforeUpdate () {}, // lifecycle - before updating"
            "Updated () {}, // life cycle - after the update"
            "BeforeDestroy () {}, // lifecycle - before destroying"
            "Destroyed () {}, // lifecycle - complete destruction"
            "Ctivated () {} // If the page has a keep-alive Cache function, this function will trigger"
            "}",
            "</script>\n",
            "<style lang='scss' scoped>",
            "// @import url (); into the public css class"
            "</style>",
            "$2"
        ],
        "description": "Log output to console"
    }
}

Guess you like

Origin www.cnblogs.com/tongshuangxiong/p/12001779.html