feat(event): add drop-before and drop-after

This commit is contained in:
youxingzhi
2019-07-17 09:54:04 +08:00
parent 6154cfd1ad
commit cf41282fcf
5 changed files with 44 additions and 28 deletions

View File

@@ -188,8 +188,9 @@ click | TreeNode | Trigger when clicking a tree node
change-name | {'id', 'oldName', 'newName'} | Trigger after changing a node's name
delete-node | TreeNode | Trigger when clicking `delNode` button. You can call `remove` of `TreeNode` to remove the node.
add-node | TreeNode | Trigger after adding a new node
drop | {'node', 'oldParent'} | Trigger after dropping a node into another
drop-up | {'node', 'oldParent'} | Trigger after extracting a node from another
drop | {node, src, target} | Trigger after dropping a node into another. node: the draggable node, src: the draggable node's parent, target: the node that draggable node will drop into
drop-before | {node, src, target} | Trigger after dropping a node before another. node: the draggable node, src: the draggable node's parent, target: the node that draggable node will drop before
drop-after | {node, src, target} | Trigger after dropping a node after another. node: the draggable node, src: the draggable node's parent, target: the node that draggable node will drop after
# customize operation icons
The component has default icons for `addTreeNode`, `addLeafNode`, `editNode`, `delNode` button, but you can also customize them: