Code fragment using Vue in vscode

Time:2020-8-1

Usage scenarios

  • Lazy people must initialize Vue file

How to use it

  1. Click the settings in the lower left corner and select the user code fragment.
  2. Enter the code fragment name and enter.
  3. Copy the following code to save.
{
    "Print to console": {
        //Prefix: trigger code, set at will. For example, if you enter SC, you will be prompted to set the code block
        "prefix": "sc", 
        //Body: set code block content
        "body": [
            "<template>",
            " <div>\n",
            " </div>",
            "</template>\n",
            "<script>",
            " export default {",
            "   name:'',",
            "   data () {",
            "     return {\n",
            "     }",
            "   },",
            "   components: {\n",
            "   }",
            " }",
            "</script>\n",
            "<style scpoed>\n",
            " ",
            "</style>",
            "$2"
        ],
    }
}