From f01c61e09f745b6c422f0543749dcaf0869b6ce5 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 6 Jul 2025 19:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20App.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0d455796..3b599fe0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -126,14 +126,8 @@ function startBackgroundRotation() { function animateAndRemoveLoader() { const loadingBg = document.querySelector('#loading-bg') as HTMLElement if (loadingBg) { - // 添加完成动画类 - loadingBg.classList.add('loading-complete') - - // 等待动画完成后移除 - setTimeout(() => { - removeEl('#loading-bg') - document.documentElement.style.removeProperty('background') - }, 800) + removeEl('#loading-bg') + document.documentElement.style.removeProperty('background') } } @@ -173,12 +167,12 @@ async function removeLoadingWithStateCheck() { // 检查未读消息 checkAndEmitUnreadMessages() - } catch (error) { - // 即使出错也要移除加载界面 - globalLoadingStateManager.reset() - animateAndRemoveLoader() - } + } catch (error) { + // 即使出错也要移除加载界面 + globalLoadingStateManager.reset() + animateAndRemoveLoader() } +} // 加载背景图片 async function loadBackgroundImages(retryCount = 0) {