Visual Studio Code 中自定义vue模板文件的通用内容

在这里插入图片描述
在这里插入图片描述
打开文件后,复制下方内容保存即可,待保存完毕后,在vue文件中输入vue即可生成配置的通用模板

{
  "vue template": {
    "prefix": "vue",
    "body": [
      "<template>",
      "  <section class=\"wrap\"></section>",
      "</template>",
      "",
      "<script>",
      "export default {",
      "  name: \"\",",
      "  components: {},",
      "  props: {},",
      "  data() {",
      "    return {};",
      "  },",
      "  computed: {},",
      "  watch: {},",
      "  created() {},",
      "  mounted() {},",
      "  beforeDestroy() {},",
      "  methods: {},",
      "};",
      "</script>",
      "",
      "<style lang=\"scss\" scoped>",
      "@mixin boxSize($$h: 100%, $$w: 100%) {",
      "  width: $$w;",
      "  height: $$h;",
      "}",
      ".wrap {",
      "  @include boxSize();",
      "}",
      "</style>",
      ""
    ]
  }
}