From 702cf6e9b4a3b5ca6f1beac58e14853ae5932b94 Mon Sep 17 00:00:00 2001 From: yuyx <237899745@qq.com> Date: Sun, 30 Nov 2025 11:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E9=A1=B5=E9=9D=A2loading=E7=8A=B6=E6=80=81=20-=20?= =?UTF-8?q?=E5=9C=A8mounted=E4=B8=AD=E6=8F=90=E5=89=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将healthCheck.loading和systemLogs.loading初始值改回false - 在mounted中、checkLoginStatus之前,判断adminTab并设置loading - 确保在appReady变为true之前loading状态已正确设置 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend/app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index b31e50d..f3c2a06 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -165,7 +165,7 @@ createApp({ // 健康检测 healthCheck: { - loading: localStorage.getItem('adminTab') === 'monitor', // 如果在监控页刷新,初始显示加载中 + loading: false, lastCheck: null, overallStatus: null, // healthy, warning, critical summary: { total: 0, pass: 0, warning: 0, fail: 0, info: 0 }, @@ -174,7 +174,7 @@ createApp({ // 系统日志 systemLogs: { - loading: localStorage.getItem('adminTab') === 'monitor', // 如果在监控页刷新,初始显示加载中 + loading: false, logs: [], total: 0, page: 1, @@ -2876,6 +2876,13 @@ handleDragLeave(e) { this.checkUrlParams(); // 获取系统配置(上传限制等) this.loadPublicConfig(); + + // 如果用户在监控页面刷新,提前设置loading状态(防止显示"无数据"闪烁) + if (this.adminTab === 'monitor') { + this.healthCheck.loading = true; + this.systemLogs.loading = true; + } + // 检查登录状态 this.checkLoginStatus(); },