From 95f5d725ac318b28066f60662975e79a208f708d Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Wed, 19 Jan 2022 09:19:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BC=80=E5=A7=8B=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E6=97=B6=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ItemBox/index.vue | 114 ++++++++++-------- 1 file changed, 66 insertions(+), 48 deletions(-) diff --git a/src/views/chart/components/ContentCharts/components/ItemBox/index.vue b/src/views/chart/components/ContentCharts/components/ItemBox/index.vue index 933e5310..98fd90f9 100644 --- a/src/views/chart/components/ContentCharts/components/ItemBox/index.vue +++ b/src/views/chart/components/ContentCharts/components/ItemBox/index.vue @@ -1,18 +1,26 @@ @@ -26,6 +34,14 @@ defineProps({ default: () => [] } }) + +// 拖拽处理 +const handleDragStart = (e: DragEvent, item: any) => { + if (e.dataTransfer instanceof Object && e.target instanceof Object) { + e.dataTransfer.setData('chartName', item.key) + e.dataTransfer.setData('chartNode', item.node) + } +}