3 seconds to teach you how to configure the vue3 code in vscode to quickly generate templates

1. First click the gear settings button in the lower left corner of your vscode, and then click Configure User Code Snippet.

 2. Enter vue to search for the file vue.json, and then click on this file

3. Next, just enter and paste the following code under the original comment

code show as below:

  "vue3": {
        "prefix": "vue3",
        "body": [
            "<template>",
            "  <div class=\"\">",
            "",
            "",
            "",
            "",
            "  </div>",
            "</template>",
            "<script setup lang=\"ts\">",
			"import {ref,reactive} from \"vue\"",
            "",
            "",
            "",
            "",            
            "</script>",
            "<style lang=\"scss\" scoped>",
            "",
            "",
            "",
            "",
            "</style>",
            ""
        ],
        "description": "快速创建vue3模板"
    }

 4. Finally, you only need to enter vue3 in the .vue file, and the template will come out once you press Enter

 Hurry up and try it!

Guess you like

Origin blog.csdn.net/LLL3189860667/article/details/131964958