## Tree
Display information can be unfolded or folded in a clear hierarchy.
### How to use
Display the basic tree structure.
::: demo
```html
```
:::
### Options
Used for level selection. In the following example, the layer data is unpredictable when the data is clicked(ps: the data is acquired when clicked the current layer). If there is no lower layer data, the pull-down button is disappeared.
::: demo
```html
```
:::
### Attributes
| Attribute | Description | Type | Options | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| data | Show the data | array | — | — |
| props | Configuration options, to see the following table | object | — | — |
| load | Method for loading subtree data | function(node, resolve) | — | — |
### props
| Attribute | Description | Type | Options | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| label | Specifies that a node label is a property value of a node object | string | — | — |
| children | The specified subtree is a property value of the node object | string | — | — |
### Method
`Tree` has the following method, which returns the currently selected array of nodes.
| Method | Description | Parameter |
|---------- |-------- |---------- |
| getCheckedNodes | If the node can be selected(`show-checkbox` is `true`), it returns the currently selected array of nodes | Accept a boolean type parameter whose default value is `false`.
If the parameter is `true`, it only returns the currently selected array of sub-nodes.|
### Events
| Event | Description | Callback |
|---------- |-------- |---------- |
| node-click | Callback when the node is clicked | The instance that corresponds to the node in the array passed to the `data` property |
| check-change | Callback when the selected state of the node changes | Three parameters:
The instance that corresponds to the node in the array passed to the `data` property,
whether the node itself is selected,
whether there are selected nodes in the subtree of the node|