---
name: Tree 树选择
route: /tree
parent: 组件
menu: 数据录入
---
import { Playground, Props } from 'docz'
import  Tree,{Tree as API}  from '../components/tree'


# Tree 树选择
>提示: 展开代码编辑器可以在线编辑，实时生效

## 基础用法

<Playground>
    <Tree mode='select' onChange={console.log} options={[
                                     {
                                         label: '分组1',
                                         value: 1,
                                         children: [
                                             {
                                                 label: '分组1.1',
                                                 value: 2,
                                                 children: [{ label: '分组1.1.1', value: 3 }, { label: '分组1.1.2', value: 4 }],
                                             },
                                             {
                                                 label: '分组1.2',
                                                 value: 5,
                                                 children: [{ label: '分组1.2.1', value: 6 }, { label: '分组1.2.2', value: 7 }],
                                             },
                                             { label: '分组1.3', value: 8 },
                                         ],
                                     },
                                 ]}/>

    
</Playground>



## API


<Props of={API} />