From b9fbc184b8800a0b9f9c59ef8ba64c321bd51fc4 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 30 Aug 2024 10:56:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E6=97=B6=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=B0=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E4=BD=86=E6=B0=B4=E5=8D=B0=E8=A6=86=E7=9B=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=B2=A1=E6=9C=89=E8=BF=BD=E5=8A=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/data-visualization/canvas/CanvasCore.vue | 9 ++++++++- core/core-frontend/src/views/canvas/DeCanvas.vue | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) 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 5df55f1fdc..4f161b44dc 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -245,6 +245,12 @@ watch( } ) +const watermarkUpdate = () => { + setTimeout(() => { + initWatermark() + }) +} + const initWatermark = (waterDomId = 'editor-canvas-main') => { try { if ( @@ -1459,7 +1465,8 @@ defineExpose({ getMoveItem, handleMouseUp, handleMouseDown, - findPositionX + findPositionX, + watermarkUpdate }) diff --git a/core/core-frontend/src/views/canvas/DeCanvas.vue b/core/core-frontend/src/views/canvas/DeCanvas.vue index a3e1def7e4..e0bf26f7d4 100644 --- a/core/core-frontend/src/views/canvas/DeCanvas.vue +++ b/core/core-frontend/src/views/canvas/DeCanvas.vue @@ -257,6 +257,7 @@ const scrollTo = y => { top: (y - 1) * baseHeight.value, behavior: 'smooth' }) + cyGridster.value?.watermarkUpdate() }) }