File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 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
1717import OrgTree from ' react-org-tree' ;
1818
1919const horizontal = false ; // true:横向 false:纵向
20+ const collapsable = true ; // true:可折叠 false:不可折叠
21+ const expandAll = true ; // true: 全部展开 false:全部折叠
22+
2023const 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
You can’t perform that action at this time.
0 commit comments