mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-19 06:43:16 +08:00
498 B
498 B
基本
- order: 0
最简单的用法。
import { Tree } from 'antd';
const TreeNode = Tree.TreeNode;
ReactDOM.render(
<Tree defaultExpandAll={false}>
<TreeNode title="parent 1">
<TreeNode title="leaf" />
<TreeNode title="parent 1-1">
<TreeNode title="parent 2-1">
<TreeNode title="leaf" />
<TreeNode title="leaf" />
</TreeNode>
<TreeNode title="leaf" />
</TreeNode>
</TreeNode>
</Tree>
, mountNode);