<template>
  <div class="demo-tree-select-multiple">
    <div class="demo-box">
      <ui-tree-select
        v-model="value"
        :tree-data="treeData"
        :tree-default-expanded-keys="['1']"
        multiple
        label-in-value>
      </ui-tree-select>
    </div>
    <div class="demo-box">
      <ui-tree-select
        v-model="value"
        :tree-data="treeData"
        :tree-default-expanded-keys="['1']"
        tree-checkable
        multiple
        label-in-value>
      </ui-tree-select>
    </div>
    <div class="demo-box">
      <ui-tree-select
        v-model="value"
        :tree-data="treeData"
        :tree-default-expanded-keys="['1']"
        multiple
        label-in-value
        disabled>
      </ui-tree-select>
    </div>
  </div>
</template>

<script>
import { TreeSelect } from "amumu-ui"
export default {
  components: {
    "ui-tree-select": TreeSelect,
  },
  data() {
    return {
      value: [
        {
          label: "未知的世界",
          value: "0",
        },
        {
          label: "三级 1-1-1",
          value: "9",
        },
        {
          label: "二级 3-2",
          value: "8",
        },
      ],
      treeData: [
        {
          value: "1",
          label: "一级 1",
          children: [
            {
              value: "4",
              label: "二级 1-1",
              children: [
                {
                  value: "9",
                  label: "三级 1-1-1",
                },
                {
                  value: "10",
                  label: "三级 1-1-2",
                },
              ],
            },
          ],
        },
        {
          value: "2",
          label: "一级 2",
          children: [
            {
              value: "5",
              label: "二级 2-1",
            },
            {
              value: "6",
              label: "二级 2-2",
            },
          ],
        },
        {
          value: "3",
          label: "一级 3",
          children: [
            {
              value: "7",
              label: "二级 3-1",
            },
            {
              value: "8",
              label: "二级 3-2",
            },
          ],
        },
      ],
    }
  },
}
</script>

<style lang="scss">
.demo-tree-select-basic {
}
</style>
