From 6c8ecb8fda3bd43b9a5aa2e54087a7d30389ef09 Mon Sep 17 00:00:00 2001 From: zheng020 Date: Tue, 2 Jun 2026 22:10:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor(dashboard):=20Header=20.tab=20?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=85=B7=E4=BD=93=E5=B1=9E=E6=80=A7=20transi?= =?UTF-8?q?tion=20=E8=80=8C=E9=9D=9E=20transition:=20all?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码评审指出 `transition: all` 是已知的 CSS 反模式——会触 发所有属性的动画,包括未预期的 layout-trigger 属性(width、 height、padding 等)。窄化为 `background` 与 `color`,符合 .tab 实际变化的状态。 --- frontend/pages/dashboard/components/DashboardHeader.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/pages/dashboard/components/DashboardHeader.vue b/frontend/pages/dashboard/components/DashboardHeader.vue index 9f8c1bf..44bba77 100644 --- a/frontend/pages/dashboard/components/DashboardHeader.vue +++ b/frontend/pages/dashboard/components/DashboardHeader.vue @@ -135,7 +135,7 @@ defineEmits(['update:activeTab']) font-size: 28rpx; color: rgba(255, 255, 255, 0.75); border-radius: 22rpx; - transition: all 0.25s ease; + transition: background 0.25s ease, color 0.25s ease; } .tab-active {