fix:编辑树

This commit is contained in:
wh 2018-01-18 09:51:06 +08:00
parent ae1c5f96c6
commit 6ab4721e77
2 changed files with 11 additions and 11 deletions

View File

@ -1,8 +1,7 @@
/** /**
* *
* @title Tree 节点可编辑 * @title Tree 节点可编辑
* @description 双击节点可编辑 * @description 鼠标移动到节点上点击编辑图标进行编辑e.node.props.eventKey代表当前节点key值editKey指当前操作的节点key
*
*/ */
@ -36,7 +35,7 @@ class Demo8 extends Component {
onMouseEnter = (e) => { onMouseEnter = (e) => {
this.setState({ this.setState({
isHover: e.node.props.pos isHover: e.node.props.eventKey
}) })
} }
onMouseLeave = (e, treenode) => { onMouseLeave = (e, treenode) => {
@ -103,6 +102,7 @@ class Demo8 extends Component {
isLeaf: true isLeaf: true
}, ], }, ],
}); });
}, 100); }, 100);
} }
render() { render() {

File diff suppressed because one or more lines are too long