From a2ae5496f6687eed5af27ee2088009d773f8c6a9 Mon Sep 17 00:00:00 2001 From: wisonic Date: Wed, 10 Jul 2024 19:34:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=9B=BE=E8=A1=A8=E7=BC=96=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/canvas/Shape.vue | 2 +- .../components/plugin/src/PluginComponent.vue | 2 +- .../views/chart/components/editor/index.vue | 1396 +++++++++-------- .../views/chart/components/views/index.vue | 2 +- 4 files changed, 732 insertions(+), 670 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index d39590b522..795cdd1e5e 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -304,7 +304,7 @@ const boardMoveActive = computed(() => { 'symbolic-map', 'heat-map' ] - return CHARTS.includes(element.value.innerType) + return element.value.isPlugin || CHARTS.includes(element.value.innerType) }) const dashboardActive = computed(() => { diff --git a/core/core-frontend/src/components/plugin/src/PluginComponent.vue b/core/core-frontend/src/components/plugin/src/PluginComponent.vue index 72433e52d3..1766d35417 100644 --- a/core/core-frontend/src/components/plugin/src/PluginComponent.vue +++ b/core/core-frontend/src/components/plugin/src/PluginComponent.vue @@ -94,7 +94,7 @@ const invokeMethod = param => { if (pluginProxy.value['invokeMethod']) { pluginProxy.value['invokeMethod'](param) } else { - pluginProxy.value[param.methodName](param.args) + pluginProxy.value[param.methodName]?.(param.args) } } diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 975cd5058b..22daf42a6a 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -1533,7 +1533,14 @@ const singleDragStart = (e: DragEvent, ele, type) => { if (!activeChild.value.length) { activeChild.value = [ele] } - startToMove(e, unref(activeQuota.value)) + e.dataTransfer.setData( + 'quota', + JSON.stringify( + activeQuota.value + .filter(ele => ele.id) + .map(ele => ({ ...cloneDeep(unref(ele)), datasetId: view.value.tableId })) + ) + ) } const dragEnd = () => { @@ -1613,25 +1620,25 @@ const deleteChartFieldItem = id => { size="20px" @click="collapseChange('chartAreaCollapse')" > - - + + -
+
{{ view.title }}
{{ view.title }} -
+
{ />
- { >