2015-08-03 16:07:21 +08:00
|
|
|
# 基本
|
|
|
|
|
|
|
|
- order: 0
|
|
|
|
|
|
|
|
最简单的用法。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
2015-10-29 13:42:40 +08:00
|
|
|
import { Tree } from 'antd';
|
|
|
|
const TreeNode = Tree.TreeNode;
|
2015-08-18 16:03:13 +08:00
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
ReactDOM.render(
|
2015-08-24 18:28:00 +08:00
|
|
|
<Tree defaultExpandAll={false}>
|
2015-08-14 23:28:20 +08:00
|
|
|
<TreeNode title="parent 1">
|
2015-08-24 18:12:07 +08:00
|
|
|
<TreeNode title="leaf" />
|
2015-08-10 20:23:18 +08:00
|
|
|
<TreeNode title="parent 1-1">
|
|
|
|
<TreeNode title="parent 2-1">
|
2015-08-24 18:12:07 +08:00
|
|
|
<TreeNode title="leaf" />
|
|
|
|
<TreeNode title="leaf" />
|
2015-08-03 16:07:21 +08:00
|
|
|
</TreeNode>
|
2015-08-24 18:12:07 +08:00
|
|
|
<TreeNode title="leaf" />
|
2015-08-10 20:23:18 +08:00
|
|
|
</TreeNode>
|
|
|
|
</TreeNode>
|
|
|
|
</Tree>
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-08-03 16:07:21 +08:00
|
|
|
````
|