Merge branch 'develop-0.12.0' of github.com:ant-design/ant-design into develop-0.12.0

This commit is contained in:
afc163 2016-01-14 02:40:47 +08:00
commit 7aad7ba116
4 changed files with 14 additions and 14 deletions

View File

@ -1,8 +1,8 @@
# 基本
# 右键菜单
- order: 0
最简单的用法。
右键菜单示例
---

View File

@ -45,15 +45,15 @@ const Demo = React.createClass({
expandedKeys: ['0-0', '0-0-0', '0-0-0-0'],
};
},
onTreeDragStart() {
onDragStart() {
},
onTreeDragEnter(info) {
onDragEnter(info) {
// console.log(info);
this.setState({
expandedKeys: info.expandedKeys,
});
},
onTreeDrop(info) {
onDrop(info) {
console.log(info);
const dropKey = info.node.props.eventKey;
const dragKey = info.dragNode.props.eventKey;
@ -108,9 +108,9 @@ const Demo = React.createClass({
<p>drag a node into another node</p>
<div className="draggable-container">
<Tree defaultExpandedKeys={this.state.expandedKeys} openAnimation={{}} draggable
onTreeDragStart={this.onTreeDragStart}
onTreeDragEnter={this.onTreeDragEnter}
onTreeDrop={this.onTreeDrop}>
onDragStart={this.onDragStart}
onDragEnter={this.onDragEnter}
onDrop={this.onDrop}>
{loop(this.state.gData)}
</Tree>
</div>

View File

@ -32,11 +32,11 @@
|loadData | 异步加载数据 | function(node)| - |
|onRightClick | 显示右键菜单 | function({event,node}) | - |
|draggable | 设置节点可拖拽IE>8 | bool | false |
|onTreeDragStart | 开始拖拽时调用 | function({event,node}) | - |
|onTreeDragEnter | dragenter 触发时调用 | function({event,node,expandedKeys}) | - |
|onTreeDragOver | dragover 触发时调用 | function({event,node}) | - |
|onTreeDragLeave | dragleave 触发时调用 | function({event,node}) | - |
|onTreeDrop | drop 触发时调用 | function({event, node, dragNode, dragNodesKeys}) | - |
|onDragStart | 开始拖拽时调用 | function({event,node}) | - |
|onDragEnter | dragenter 触发时调用 | function({event,node,expandedKeys}) | - |
|onDragOver | dragover 触发时调用 | function({event,node}) | - |
|onDragLeave | dragleave 触发时调用 | function({event,node}) | - |
|onDrop | drop 触发时调用 | function({event, node, dragNode, dragNodesKeys}) | - |
### TreeNode props

View File

@ -61,7 +61,7 @@
"rc-tabs": "~5.6.0",
"rc-time-picker": "~1.0.0",
"rc-tooltip": "~3.3.0",
"rc-tree": "^0.25.3",
"rc-tree": "~0.26.1",
"rc-tree-select": "^0.3.3",
"rc-trigger": "~1.0.6",
"rc-upload": "~1.7.0",