From 46d6cf9ae60b2afe00c8f81cf261d8a2642ca79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=83=E5=90=89/=EC=9B=90=EA=B8=B8/OneGil?= Date: Wed, 30 Aug 2023 11:40:14 +0800 Subject: [PATCH] fix: set correct loading state in iframeView (#223) --- packages/client/components/IframeView.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/client/components/IframeView.vue b/packages/client/components/IframeView.vue index e4cd167e..0979b02e 100644 --- a/packages/client/components/IframeView.vue +++ b/packages/client/components/IframeView.vue @@ -18,6 +18,7 @@ onMounted(() => { if (iframeCacheMap.get(key.value)) { iframeEl.value = iframeCacheMap.get(key.value)! iframeEl.value.style.visibility = 'visible' + iframeLoaded.value = true } else { iframeEl.value = document.createElement('iframe') @@ -45,10 +46,8 @@ watchEffect(updateIframeBox) watchEffect(syncColorMode) onUnmounted(() => { - if (iframeEl.value) { + if (iframeEl.value) iframeEl.value.style.visibility = 'hidden' - iframeLoaded.value = false - } }) function syncColorMode() {