vscode vue 文件模板

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/GreekMrzzJ/article/details/83019547

1. 安装VueHelper插件

在这里插入图片描述

2. 寻找 vue.json

按顺序点击vscode的:

  1. 文件
  2. 首选项
  3. 用户代码片段
  4. 接着搜索框中输入 vue, 回车

3. 填写模板内容

直接复制一下内容到 vue.json

{
  "Print to console": {
    "prefix": "vue",
    "body": [
      "<template>",
      " <div>\n",
      " </div>",
      "</template>\n",
      "<script>",
      " export default {",
      "   name: '',",
      "   data () {",
      "     return {\n",
      "     }",
      "   },",
      "   components: {\n",
      "   }",
      " }",
      "</script>\n",
      "<style scoped>\n",
      " ",
      "</style>",
      "$2"
    ],
    "description": "Log output to console"
  }
}

4. 重启vscode

5. 测试

  1. 新建一个 vue 文件
  2. 输入 vue 之后,点击 Tab
  3. Happy Coding!

猜你喜欢

转载自blog.csdn.net/GreekMrzzJ/article/details/83019547