mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
up tree draggable demo
This commit is contained in:
parent
4ace891cd6
commit
79d1fd4043
@ -46,9 +46,11 @@ const Demo = React.createClass({
|
||||
};
|
||||
},
|
||||
onDragEnter(info) {
|
||||
this.setState({
|
||||
expandedKeys: info.expandedKeys,
|
||||
});
|
||||
console.log(info);
|
||||
// expandedKeys 需要受控时设置
|
||||
// this.setState({
|
||||
// expandedKeys: info.expandedKeys,
|
||||
// });
|
||||
},
|
||||
onDrop(info) {
|
||||
console.log(info);
|
||||
@ -88,7 +90,6 @@ const Demo = React.createClass({
|
||||
}
|
||||
this.setState({
|
||||
gData: data,
|
||||
expandedKeys: info.originExpandedKeys,
|
||||
});
|
||||
},
|
||||
render() {
|
||||
|
@ -26,8 +26,8 @@
|
||||
|selectedKeys | (受控)设置选中的树节点 | String[] | - |
|
||||
|defaultSelectedKeys | 默认选中的树节点 | String[] | [] |
|
||||
|onExpand | 展开/收起节点时触发 | function(node, expanded, expandedKeys) | - |
|
||||
|onCheck | 点击复选框触发 | function(e:{checked:bool, node, checkedKeys, event}) | - |
|
||||
|onSelect | 点击树节点触发 | function(e:{selected:bool,node,selectedKeys,event}) | - |
|
||||
|onCheck | 点击复选框触发 | function(checkedKeys, e:{checked: bool, checkedNodes, node, event}) | - |
|
||||
|onSelect | 点击树节点触发 | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - |
|
||||
|filterTreeNode | filter some treeNodes as you need. it should return true | function(node) | - |
|
||||
|loadData | 异步加载数据 | function(node)| - |
|
||||
|onRightClick | 响应右键点击 | function({event,node}) | - |
|
||||
|
@ -62,7 +62,7 @@
|
||||
"rc-tabs": "~5.7.0",
|
||||
"rc-time-picker": "~1.1.0",
|
||||
"rc-tooltip": "~3.3.1",
|
||||
"rc-tree": "~1.0.2",
|
||||
"rc-tree": "~1.1.0",
|
||||
"rc-tree-select": "~1.0.1",
|
||||
"rc-trigger": "~1.1.1",
|
||||
"rc-upload": "~1.8.0",
|
||||
|
Loading…
Reference in New Issue
Block a user