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!