VSCode配置路径:file => preferences => user snippets 新建vue.json

{
  "Vue3.2快速生成模板": {
    "prefix": "Vue3.2",
    "body": [
      "<!-- $1 -->",
      "<template>",
      "\t<div class=\"\">",
      "\t\t$3",
      "\t</div>",
      "</template>\n",
      "<script setup>",
      "import {} from 'vue'",
      "\t$2",
      "</script>\n",
      "<style lang=\"scss\" scoped>",
      "\t$4",
      "</style>"
    ],
    "description": "Vue3.2"
  }
}

将上述代码放在vue.json文件中,在新建.vue结尾的文件中输入vue3.2 按键盘的Tab 自动生成模板。


地瓜哥
16 声望0 粉丝

keep learning