diff --git a/code/fms/.codebuddy/plans/layouts-dark-light-adaptation_aa221499.md b/code/fms/.codebuddy/plans/layouts-dark-light-adaptation_aa221499.md new file mode 100644 index 00000000..eb3f571e --- /dev/null +++ b/code/fms/.codebuddy/plans/layouts-dark-light-adaptation_aa221499.md @@ -0,0 +1,74 @@ +--- +name: layouts-dark-light-adaptation +overview: 修复 layouts 下未做 dark/light 主题适配的硬编码样式,统一改用 --fms-* token。 +todos: + - id: fix-apptabs-active + content: 修改 AppTabs.vue 激活态与关闭按钮的硬编码白色为 var(--fms-primary-text) 与 color-mix 派生 + status: completed + - id: fix-apptopbar-check + content: 修改 AppTopbar.vue .check 对勾 color:#fff 为 var(--fms-primary-text) + status: completed + - id: lint-check + content: 运行 pnpm lint 静态检查确认无新增告警 + status: completed + dependencies: + - fix-apptabs-active + - fix-apptopbar-check +--- + +## 用户需求 + +检查 `src/layouts` 下所有文件并结合 `src/theme/tokens.css`,定位未做 dark/light 模式适配的硬编码样式,并用 `--fms-*` token 替换修复,使其跟随主题切换。 + +## 产品概述 + +FMS Vue 前端布局壳(顶栏 / 侧栏 / 页签 / 导航菜单)基于 `tokens.css` 的 CSS 变量做深浅色适配。本次仅修复布局层残留的硬编码颜色,保证切换深色模式时视觉一致。 + +## 核心功能 + +- 修复 `AppTabs.vue` 激活页签的硬编码白色文字与关闭按钮白色(含 hover 态),改用 `var(--fms-primary-text)` 及基于主色文字色的 `color-mix` 派生。 +- 修复 `AppTopbar.vue` 主题色板选中对勾的硬编码 `color: #fff`,改用 `var(--fms-primary-text)`。 +- 保持其余已正确使用 token 的样式不变(DefaultLayout / AppSidebar / NavMain / NavMenuItem 及 AppTopbar 其他部分均无需改动)。 + +## 技术栈 + +- Vue 3 ` @@ -259,16 +255,632 @@ aria-busy="true" >
-
diff --git a/code/fms/fms-vue/src/components/ui/ColorThemePicker.vue b/code/fms/fms-vue/src/components/ui/ColorThemePicker.vue deleted file mode 100644 index 97b4c7eb..00000000 --- a/code/fms/fms-vue/src/components/ui/ColorThemePicker.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - - diff --git a/code/fms/fms-vue/src/components/ui/ThemeToggle.vue b/code/fms/fms-vue/src/components/ui/ThemeToggle.vue deleted file mode 100644 index 9eac7368..00000000 --- a/code/fms/fms-vue/src/components/ui/ThemeToggle.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/code/fms/fms-vue/src/components/ui/button/button.vue b/code/fms/fms-vue/src/components/ui/button/button.vue index c7a7a57f..7a73cf8d 100644 --- a/code/fms/fms-vue/src/components/ui/button/button.vue +++ b/code/fms/fms-vue/src/components/ui/button/button.vue @@ -52,7 +52,12 @@ const classes = computed(() => [