<template>
  <div class="tree-wrap">
    <m-tree :model="tredata" :sizeh="48" @change="change" collapse></m-tree>
  </div>
</template>

<script>
  export default {
    data: () => ({
      tredata: [
        {
          label: '0',
          icon: 'icon icon-msnui-server',
          children: [
            { label: '0-0' },
            { label: '0-1' },
            {
              label: '0-2',
              children: [
                {
                  label: '0-2-0',
                  children: [
                    { label: '0-2-0-0' },
                    { label: '0-2-0-1' }
                  ]
                },
                { label: '0-2-1' }
              ]
            }
          ]
        },
        {
          label: '1',
          children: [
            {
              label: '1-0'
            },
            {
              label: '1-1'
            }
          ]
        },
        {
          label: '2',
          children: [
            {
              label: '2-0'
            },
            {
              label: '2-1'
            }
          ]
        }
      ]
    }),
    methods: {
      change (d, b) {
//        console.log(d, b)
      }
    }
  }
</script>
