From d3a7696025751d283cda89d1fdd2568f34557d8b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 29 Jul 2024 11:13:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0=E5=9C=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2=E7=82=B9=E5=87=BB=E6=92=A4?= =?UTF-8?q?=E9=94=80=E6=88=96=E9=87=8D=E5=81=9A=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?Tab=E9=A1=B5=E5=B8=83=E5=B1=80=E5=8F=98=E5=8C=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/canvas/DeCanvas.vue | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/core/core-frontend/src/views/canvas/DeCanvas.vue b/core/core-frontend/src/views/canvas/DeCanvas.vue index 5ad0e5c374..a3e1def7e4 100644 --- a/core/core-frontend/src/views/canvas/DeCanvas.vue +++ b/core/core-frontend/src/views/canvas/DeCanvas.vue @@ -134,23 +134,25 @@ const handleMouseDown = e => { } const canvasInit = (isFistLoad = true) => { - renderState.value = true - setTimeout(function () { - if (canvasOut.value) { - dashboardCanvasSizeInit() - nextTick(() => { - cyGridster.value.canvasInit() //在适当的时候初始化布局组件 - cyGridster.value.afterInitOk(function () { - renderState.value = false + if (canvasActive.value) { + renderState.value = true + setTimeout(function () { + if (canvasOut.value) { + dashboardCanvasSizeInit() + nextTick(() => { + cyGridster.value.canvasInit() //在适当的时候初始化布局组件 + cyGridster.value.afterInitOk(function () { + renderState.value = false + }) }) - }) - } - // afterInit - dvMainStore.setDataPrepareState(true) - if (isMainCanvas(canvasId.value) && isFistLoad) { - snapshotStore.recordSnapshotCache('renderChart') - } - }, 500) + } + // afterInit + dvMainStore.setDataPrepareState(true) + if (isMainCanvas(canvasId.value) && isFistLoad) { + snapshotStore.recordSnapshotCache('renderChart') + } + }, 500) + } } const canvasSizeInit = () => {