From 30bd0faecbedad6ba29bd062ae7acef369d25071 Mon Sep 17 00:00:00 2001 From: wangdaodao Date: Tue, 20 Aug 2024 15:38:41 +0800 Subject: [PATCH] fix: Tree Draggable does not work on Firefox --- packages/tree/src/tree.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/tree/src/tree.vue b/packages/tree/src/tree.vue index 5b1c1b4c4ec..e1d147038a5 100644 --- a/packages/tree/src/tree.vue +++ b/packages/tree/src/tree.vue @@ -447,7 +447,9 @@ this.$on('tree-node-drag-end', (event) => { const { draggingNode, dropType, dropNode } = dragState; event.preventDefault(); - event.dataTransfer.dropEffect = 'move'; + if (event.dataTransfer) { + event.dataTransfer.dropEffect = 'move'; + } if (draggingNode && dropNode) { const draggingNodeCopy = { data: draggingNode.node.data };