<template>
  <div>
    <hive-tree
      :data="data3"
      :onLoad="loadData"
      selectable>
    </hive-tree>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data3: [
          {
            text: 'parent',
            loading: false,
            children: [],
          },
        ],
      };
    },
    methods: {
      loadData(item, callback) {
        setTimeout(() => {
          const data = [
            {
              text: 'children',
              loading: false,
              children: [],
            },
            {
              text: 'children',
              loading: false,
              children: [],
            },
          ];
          callback(data);
        }, 1000);
      },
    },
  };
</script>
