From a50c41d0b009bf948bb95d41a1f7b19bd0b85cde Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 20 Feb 2025 10:57:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B5=8C=E5=85=A5=E5=BC=8Fdiv=20=E5=B5=8C=E5=85=A5=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E6=9D=BF=E6=8C=87=E6=A0=87=E5=8D=A1/=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=B2=A1=E5=8A=9E=E6=B3=95=E8=B7=B3=E5=88=B0?= =?UTF-8?q?=E5=8F=A6=E4=B8=80=E4=B8=AA=E4=BB=AA=E8=A1=A8=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/canvas/ComponentWrapper.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 86eb274bf8..6fcd92ff9f 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -14,6 +14,8 @@ import { activeWatermarkCheckUser, removeActiveWatermark } from '@/components/wa import { isMobile } from '@/utils/utils' import { isDashboard } from '@/utils/canvasUtils' import { XpackComponent } from '@/components/plugin' +import { useAppStoreWithOut } from '@/store/modules/app' +const appStore = useAppStoreWithOut() const componentWrapperInnerRef = ref(null) const componentEditBarRef = ref(null) @@ -295,6 +297,7 @@ const slotStyle = computed(() => { const onPointClick = param => { emits('onPointClick', param) } +const isEmbedded = computed(() => appStore.getIsDataEaseBi || appStore.getIsIframe) const eventEnable = computed( () => @@ -319,17 +322,17 @@ const onWrapperClick = e => { const url = config.value.events.jump.value const jumpType = config.value.events.jump.type try { - let newWindow if ('newPop' === jumpType) { window.open( url, '_blank', 'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no' ) + } else if ('_blank' === jumpType && isEmbedded.value) { + window.open(url, '_blank') } else { - newWindow = window.open(url, jumpType) + initOpenHandler(window.open(url, jumpType)) } - initOpenHandler(newWindow) } catch (e) { console.warn('url 格式错误:' + url) }