vscode下--vue的snippets.md

简书迁移

Posted by thrfox on June 29, 2020

复制到vscode的snipper里,缩写vv

{
  "Create vue template": {
    "prefix": "vv",
    "body": [
      "<template>",
      "  <div>",
      "    ${4:content}",
      "  </div>",
      "</template>",
      "<script>",
      "export default {",
      "  name: \"${2:component_name}\",",
      "  components: {},",
      "  data () {",
      "    return {",
      "    };",
      "  },",
      "  computed: {},",
      "  watch: {},",
      "  created() {},",
      "  mounted() {},",
      "  beforeDestroy() {},",
      "  methods: {},",
      "}",
      "</script>",
      "<style lang=\"${3:less}\" scoped>",
      "</style>",
      ""
    ],
    "description": "Create vue template"
  }
}