From 6acb8b4782516d6a45e4e3fdb54ee98e29fc0b85 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 21 Feb 2025 13:40:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=B9=E7=AA=97=E5=8C=BA=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95=E5=81=8F?= =?UTF-8?q?=E7=A7=BB=E3=80=81=E6=97=B6=E9=97=B4=E8=BF=87=E6=BB=A4=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E7=BC=96=E8=BE=91=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=81=E6=8E=A7=E5=88=B6=E5=8F=B0=E5=BC=82=E5=B8=B8=E7=AD=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/canvas/CanvasCore.vue | 6 +++++- .../data-visualization/canvas/ComponentWrapper.vue | 2 -- core/core-frontend/src/components/plugin/src/index.vue | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index ceae5afc13..1ecd9216ac 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -554,7 +554,11 @@ const handleContextMenu = e => { // 组件处于编辑状态的时候 如富文本 不弹出右键菜单 if (!curComponent.value || (curComponent.value && !curComponent.value.editing)) { - if (curComponent.value && ['VQuery'].includes(curComponent.value.component)) { + if ( + curComponent.value && + ['VQuery'].includes(curComponent.value.component) && + curComponent?.value['category'] === 'base' + ) { left = left * curBaseScale.value + 150 top = top * curBaseScale.value + curComponent.value.style.top * (1 - curBaseScale.value) } diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index b91d67790c..601daf7c89 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -181,8 +181,6 @@ onMounted(() => { }) const onClick = e => { - e.preventDefault() - e.stopPropagation() // 将当前点击组件的事件传播出去 eventBus.emit('componentClick') dvMainStore.setInEditorStatus(true) diff --git a/core/core-frontend/src/components/plugin/src/index.vue b/core/core-frontend/src/components/plugin/src/index.vue index 5b56d5a364..63110d9c1c 100644 --- a/core/core-frontend/src/components/plugin/src/index.vue +++ b/core/core-frontend/src/components/plugin/src/index.vue @@ -97,7 +97,7 @@ const storeCacheProxy = byteArray => { } const pluginProxy = ref(null) const invokeMethod = param => { - if (pluginProxy.value['invokeMethod']) { + if (pluginProxy.value && pluginProxy.value['invokeMethod']) { pluginProxy.value['invokeMethod'](param) } else if (param.methodName && pluginProxy.value[param.methodName]) { pluginProxy.value[param.methodName](param.args)