Skip to content

Commit d25fdd8

Browse files
author
dongxingbin
committed
doc:更新文档
1 parent 8cd061b commit d25fdd8

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ yarn add react-org-tree
1717
import OrgTree from 'react-org-tree';
1818

1919
const horizontal = false; // true:横向 false:纵向
20+
const collapsable = true; // true:可折叠 false:不可折叠
21+
const expandAll = true; // true: 全部展开 false:全部折叠
22+
2023
const data = {
2124
id: 0,
2225
label: 'XXX股份有限公司',
@@ -45,18 +48,28 @@ const data = {
4548
<OrgTree
4649
data={data}
4750
horizontal={horizontal}
51+
collapsable={collapsable}
52+
expandAll={expandAll}
4853
>
4954
```
5055

5156
### Preview
5257

53-
`horizontal`
58+
`横向(horizontal)`
59+
60+
<img src="https://upload-images.jianshu.io/upload_images/3100736-1b67a2ff46365c3a.png" width="939px" style="display:inline;">
61+
62+
`纵向(vertical)`
63+
64+
<img src="https://upload-images.jianshu.io/upload_images/3100736-efc4287df27b79fc.png" width="854px" style="display:inline;">
65+
66+
`部分展开(expand)`
5467

55-
<img src="https://github.com/artdong/react-org-tree/blob/master/img/1.png" width="939px" style="display:inline;">
68+
<img src="https://upload-images.jianshu.io/upload_images/3100736-ba7d1e5f955f2d7f.png" width="673px" style="display:inline;">
5669

57-
`vertical`
70+
`全部展开(expandAll)`
5871

59-
<img src="https://github.com/artdong/react-org-tree/blob/master/img/2.png" width="854px" style="display:inline;">
72+
<img src="https://upload-images.jianshu.io/upload_images/3100736-9a338b3b8b6ee580.png" width="773px" style="display:inline;">
6073

6174

6275

0 commit comments

Comments
 (0)