From 8d2fe2c09cffed2d1a920be451832607ae626a47 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 8 May 2024 15:11:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B5=8C=E5=85=A5=E5=BC=8F):=20=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=E5=BC=8F=E5=9C=BA=E6=99=AF=E4=B8=8B=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E5=88=87=E6=8D=A2=E5=88=B0=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/mobile/panel/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue index 859f25e983..c786100fc2 100644 --- a/core/core-frontend/src/views/mobile/panel/index.vue +++ b/core/core-frontend/src/views/mobile/panel/index.vue @@ -89,7 +89,10 @@ const hanedleMessage = event => { } } -onBeforeMount(() => { +let p = null +const XpackLoaded = () => p(true) +onBeforeMount(async () => { + await new Promise(r => (p = r)) window.top.postMessage({ type: 'panelInit', value: true }, '*') window.addEventListener('message', hanedleMessage) useEmitt({ @@ -106,6 +109,7 @@ const mobileStatusChange = (type, value) => { eventBus.emit('removeMatrixItemById-canvas-main', value) } } + onBeforeUnmount(() => { window.removeEventListener('message', hanedleMessage) }) @@ -115,6 +119,11 @@ onBeforeUnmount(() => {
+