mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 21:59:41 +08:00
commit
c3a3db385c
@ -86,6 +86,16 @@ export interface AntTreeNodeDropEvent {
|
||||
event: React.MouseEvent<HTMLElement>;
|
||||
}
|
||||
|
||||
export interface TreeNodeNormal {
|
||||
title?: React.ReactNode;
|
||||
key: string;
|
||||
isLeaf?: boolean;
|
||||
disabled?: boolean;
|
||||
disableCheckbox?: boolean;
|
||||
selectable?: boolean;
|
||||
children?: TreeNodeNormal[];
|
||||
}
|
||||
|
||||
export interface TreeProps {
|
||||
showLine?: boolean;
|
||||
className?: string;
|
||||
@ -153,6 +163,7 @@ export interface TreeProps {
|
||||
filterTreeNode?: (node: AntTreeNode) => boolean;
|
||||
children?: React.ReactNode;
|
||||
blockNode?: boolean;
|
||||
treeData?: Array<TreeNodeNormal>;
|
||||
}
|
||||
|
||||
export default class Tree extends React.Component<TreeProps, any> {
|
||||
|
@ -46,6 +46,7 @@ Almost anything can be represented in a tree structure. Examples include directo
|
||||
| onLoad | Callback function for when a treeNode is loaded | function(loadedKeys, {event, node}) | - |
|
||||
| onRightClick | Callback function for when the user right clicks a treeNode | function({event, node}) | - |
|
||||
| onSelect | Callback function for when the user clicks a treeNode | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - |
|
||||
| treeData | treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array) | array\<{ key, title, children, \[disabled, selectable] }> | - |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
|
@ -47,6 +47,7 @@ subtitle: 树形控件
|
||||
| onLoad | 节点加载完毕时触发 | function(loadedKeys, {event, node}) | - |
|
||||
| onRightClick | 响应右键点击 | function({event, node}) | - |
|
||||
| onSelect | 点击树节点触发 | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - |
|
||||
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(key 在整个树范围内唯一) | array\<{key, title, children, \[disabled, selectable]}> | - |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user