admin-vben/packages/effects
Akuria f55b18ffd7
fix: update primary color when toggling dark/light mode with custom theme (#7909)
When a custom theme is selected and the user toggles between dark and
light mode, the primary color was not being recalculated. This was caused
by a guard condition in the builtin theme watcher that skipped updating
themeColorPrimary for custom themes during mode changes.

Remove the guard so that the primary color is always recalculated from
the theme preset when the mode changes, ensuring Element Plus CSS
variables stay in sync.

Fixes #6615
2026-05-16 10:42:35 +08:00
..
access chore: release 5.7.0 2026-03-14 09:14:23 +08:00
common-ui fix: 修复 IconPicker 在手动输入时表单值不更新的问题 (#7869) 2026-04-30 15:46:07 +08:00
hooks fix(@vben/stores): respect base URL when opening route in new window (#7837) 2026-05-01 06:49:05 +08:00
layouts fix: update primary color when toggling dark/light mode with custom theme (#7909) 2026-05-16 10:42:35 +08:00
plugins feat(@vben/plugins): tiptap 组件新增 maxHeight 属性支持及文档 (#7897) 2026-05-10 10:38:21 +08:00
request chore: release 5.7.0 2026-03-14 09:14:23 +08:00
README.md refactor: adjust all sample pages and use page components (#4118) 2024-08-11 20:05:52 +08:00

README.md

Effects 目录

effects 目录专门用于存放与轻微耦合相关的代码和逻辑。如果你的包具有以下特点,建议将其放置在 effects 目录下:

  • 状态管理:使用状态管理框架 pinia并包含处理副作用如异步操作、API 调用)的部分。
  • 用户偏好设置:使用 @vben-core/preferences 处理用户偏好设置,涉及本地存储或浏览器缓存逻辑(如使用 localStorage)。
  • 导航和路由:处理导航、页面跳转等场景,需要管理路由变化的逻辑。
  • 组件库依赖:包含与特定组件库紧密耦合或依赖大型仓库的部分。

通过将相关代码归类到 effects 目录,可以使项目结构更加清晰,便于维护和扩展。