From d690910efaec81769107aa60b40ebc040ea463d2 Mon Sep 17 00:00:00 2001 From: xfy Date: Wed, 8 Jul 2026 18:23:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E6=B6=88=E9=99=A4=E9=AA=A8?= =?UTF-8?q?=E6=9E=B6=E5=B1=8F=E2=86=92=E8=AE=A4=E8=AF=81=E2=86=92=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=B8=83=E5=B1=80=E9=97=AA?= =?UTF-8?q?=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 合并 (true, None) 和 (false, _) 两个分支为统一的 fallback 骨架屏。 旧 (true, None) 分支渲染无侧边栏的全屏居中文字「正在验证身份...」, 与骨架屏 / 正常页面的侧边栏+卡片布局完全不同,在 checked.set(true) 同步触发 re-render 时产生明显的布局跳变。统一后三个状态的布局结构 一致,过渡平滑无闪烁。 --- src/components/admin_layout.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/admin_layout.rs b/src/components/admin_layout.rs index f92c4ed..85320f5 100644 --- a/src/components/admin_layout.rs +++ b/src/components/admin_layout.rs @@ -139,16 +139,7 @@ pub fn AdminLayout() -> Element { } } } - (true, None) => { - rsx! { - div { class: "{root_class}", - div { class: "flex-1 flex items-center justify-center font-medium text-sm text-[var(--color-paper-secondary)]", - "正在验证身份..." - } - } - } - } - (false, _) => { + _ => { rsx! { div { class: "{root_class}", {nav_content}