File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ yarn add react-org-tree
17
17
import OrgTree from ' react-org-tree' ;
18
18
19
19
const horizontal = false ; // true:横向 false:纵向
20
+ const collapsable = true ; // true:可折叠 false:不可折叠
21
+ const expandAll = true ; // true: 全部展开 false:全部折叠
22
+
20
23
const data = {
21
24
id: 0 ,
22
25
label: ' XXX股份有限公司' ,
@@ -45,18 +48,28 @@ const data = {
45
48
< OrgTree
46
49
data= {data}
47
50
horizontal= {horizontal}
51
+ collapsable= {collapsable}
52
+ expandAll= {expandAll}
48
53
>
49
54
```
50
55
51
56
### Preview
52
57
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) `
54
67
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 ;" >
56
69
57
- ` vertical `
70
+ ` 全部展开(expandAll) `
58
71
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 ;" >
60
73
61
74
62
75
You can’t perform that action at this time.
0 commit comments