Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bb889a

Browse files
Modified README.md
1 parent ef898a6 commit 7bb889a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

‎README.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22

33
`npm install --save react-widget-tree`
44

5+
## API
6+
7+
```html
8+
<Tree
9+
loadData={loadData}
10+
>
11+
</Tree>
12+
```
13+
14+
### Tree props
15+
16+
| 参数 | 说明 | 类型 | 默认值 |
17+
| --- | --- | --- | --- |
18+
| prefixCls | 组件CSS样式前缀 | string | rw-listbox |
19+
| className | 组件className属性 | string | - |
20+
| style | 组件style属性 | React.CSSProperties | - |
21+
| rootId | 根节点ID | any | null |
22+
| loadingLabel | 数据加载中提示文本 | ReactNode | - |
23+
| loadingComponent | 数据加载组建类 | ReactElement | div |
24+
| loadData | 数据装载方法, 该方法接收当前节点数据对象 | function(node:Node) => Promise\|Array<Node> | - |
25+
| showIcon | 是否显示图标 | boolean | true |
26+
| showExpanderIcon | 是否显示展开/收起图标 | boolean | true |
27+
| checkable | 是否显示复选图标 | boolean | true |
28+
| maxDepth | 树形最大深度 | number | 50 |
29+
| rootComponent | 树形组建根节点类 | ReactElement | div |
30+
| childNodesWrapperComponent | 子节点列表容器组件类 | ReactElement | ChildNodesWrapper |
31+
| nodeItemWrapperComponent | 节点容器组件类 | ReactElement | Fragment |
32+
| renderIndentIcons | 自定义渲染函数 | function | null |
33+
| renderExpanderIcon | 自定义渲染函数 | function | null |
34+
| renderLoadingIcon | 自定义渲染函数 | function | null |
35+
| renderIcon | 自定义渲染函数 | function | null |
36+
| renderCheckbox | 自定义渲染函数 | function | null |
37+
| renderLabel | 自定义渲染函数 | function | null |
38+
| renderExtIcons | 自定义渲染函数 | function | null |
39+
| renderNode | 自定义渲染函数 | function | null |
40+
| onNodeClick | | function | null |
41+
| onNodeDoubleClick | | function | null |
42+
| onNodeContextMenu | | function | null |
43+
| onNodeMouseDown | | function | null |
44+
| onNodeMouseUp | | function | null |
45+
| onNodeMouseEnter | | function | null |
46+
| onNodeMouseLeave | | function | null |
47+
| onNodeMouseOver | | function | null |
48+
| onNodeMouseOut | | function | null |
49+
| onNodeMouseMove | | function | null |
550

651
## Tree属性
752

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /