Vue3.2快速生成模板

1,400 阅读1分钟

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 自动生成模板