# 示例

# 效果(可交互)

# 基本用法

<template>
  <div id="app">
    <vue-super-tree
      :tree="treeData"
      valueKey="_key"
      :height="height"
      :padding="36"
    >
      <template v-slot="{ item }">
        <span>{{ item._key }}</span>
      </template>
    </vue-super-tree>
  </div>
</template>

<script>
import treeData from "./api/index";

export default {
  name: "App",
  data() {
    return {
      treeData,
      height: 0,
    };
  },
  created() {
    this.height = document.documentElement.clientHeight - 16;
  },
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Last Updated: 6/5/2022, 6:05:10 PM