Skip to content

Commit 3d79704

Browse files
author
dongxingbin
committed
doc:更新文档
1 parent 7ea37e5 commit 3d79704

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# react-org-tree
22

3-
> A simple organization tree chart based on react
3+
> A simple organization tree component based on react
44
55
### Installation
66

@@ -16,23 +16,29 @@ yarn add react-org-tree
1616
``` js
1717
import OrgTree from 'react-org-tree';
1818

19-
const horizontal = false;
19+
const horizontal = false; // true:横向 false:纵向
2020
const data = {
2121
id: 0,
2222
label: 'XXX股份有限公司',
2323
children: [{
2424
id: 1,
2525
label: '技术部',
2626
children: [{
27-
id: 3,
28-
label: '后端'
29-
}, {
3027
id: 4,
31-
label: '前端'
28+
label: '后端工程师'
29+
}, {
30+
id: 5,
31+
label: '前端工程师'
32+
}, {
33+
id: 6,
34+
label: '运维工程师'
3235
}]
3336
}, {
3437
id: 2,
3538
label: '人事部'
39+
}, {
40+
id: 3,
41+
label: '销售部'
3642
}]
3743
}
3844

@@ -42,6 +48,18 @@ const data = {
4248
>
4349
```
4450

51+
### Preview
52+
53+
`horizontal`
54+
55+
<img src="https://github.com/artdong/react-org-tree/blob/master/img/1.png" width="520px" style="display:inline;">
56+
57+
`vertical`
58+
59+
<img src="https://github.com/artdong/react-org-tree/blob/master/img/2.png" width="520px" style="display:inline;">
60+
61+
62+
4563

4664

4765

0 commit comments

Comments
 (0)