Add drop handler

This commit is contained in:
huchenlei
2024-08-31 20:40:14 -04:00
committed by Chenlei Hu
parent 86e7c12e27
commit bc7da487e8
2 changed files with 6 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ onMounted(() => {
onDrop: (event) => {
const dndData = event.source.data as TreeExplorerDragAndDropData
if (dndData.type === 'tree-explorer-node') {
props.node.handleDrop?.(props.node, dndData)
canDrop.value = false
emit('itemDropped', props.node, dndData.data)
}