<template>
    <div class="ht-base-tree-loading-demo">
        <ht-base-tree :data="data" :load-data="loadData" show-checkbox></ht-base-tree>
    </div>
</template>

<script>
  export default {
    name: 'HtBaseTreeLoadingDemo',
      data () {
          return {
              data: [
                  {
                      title: '父节点',
                      loading: false,
                      children: []
                  }
              ]
          }
      },
      methods: {
          loadData (item, callback) {
              setTimeout(() => {
                  const data = [
                      {
                          title: '子节点',
                          loading: false,
                          children: []
                      },
                      {
                          title: '子节点',
                          loading: false,
                          children: []
                      }
                  ];
                  callback(data);
              }, 1000);
          }
      }
  }
</script>
<style>
    .ht-base-tree-loading-demo {

    }
</style>

