0.6.4 • Published 2 years ago

enurm-vue3-mindmap v0.6.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue3-mindmap

Mindmap component for Vue3. Fork from https://github.com/hellowuxin/vue3-mindmap/

Install

npm install enurm-vue3-mindmap

Example

<template>
  <mindmap v-model="data"></mindmap>
</template>

<script>
import mindmap from 'vue3-mindmap'
import 'vue3-mindmap/dist/style.css'

export default defineComponent({
  components: { mindmap },
  setup () => {
    const data = [{
      "name":"Computer programming",
      "children": [
        {
          "name":"Web",
          "children": [
            { "name":"HTML & CSS" },
            { "name":"JavaScript" },
            ...
          ]
        },
        {
          "name":"Windows",
          "collapse": true,
          "children": [ { "name": "C#" } ]
        },
        { "name":"Other", "left": true },
        ...
      ]
    }]

    return { data }
  }
})
</script>