Blame view

src/views/demo/tree/index.vue 846 Bytes
陈文彬 authored
1
<template>
2
3
  <PageWrapper title="Tree基础示例">
    <div class="flex">
4
      <BasicTree :treeData="treeData" title="基础示例" class="w-1/3" />
陈文彬 authored
5
6
      <BasicTree :treeData="treeData" title="可勾选" :checkable="true" class="w-1/3 mx-4" />
陈文彬 authored
7
8
9
10
11
12
13
14
15
      <BasicTree
        title="默认展开/勾选示例"
        :treeData="treeData"
        :checkable="true"
        :expandedKeys="['0-0']"
        :checkedKeys="['0-0']"
        class="w-1/3"
      />
16
17
    </div>
  </PageWrapper>
陈文彬 authored
18
19
20
21
22
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { BasicTree } from '/@/components/Tree/index';
  import { treeData } from './data';
23
  import { PageWrapper } from '/@/components/Page';
陈文彬 authored
24
25

  export default defineComponent({
26
    components: { BasicTree, PageWrapper },
陈文彬 authored
27
28
29
30
31
    setup() {
      return { treeData };
    },
  });
</script>