admin-vben5/packages/effects
ming4762 3d9dba965f
perf: perf the control logic of Tab (#6220)
* perf: perf the control logic of Tab

* 每个标签页Tab使用唯一的key来控制关闭打开等逻辑
* 统一函数获取tab的key
* 通过3种方式设置tab key:1、使用router query参数pageKey 2、使用路由meta参数fullPathKey设置使用fullPath或path作为key
* 单个路由可以打开多个标签页
* 如果设置fullPathKey为false,则query变更不会打开新的标签(这很实用)

* perf: perf the control logic of Tab

* perf: perf the control logic of Tab

* 测试用例适配

* perf: perf the control logic of Tab

* 解决AI提示的警告
2025-05-18 10:33:02 +08:00
..
access chore: release v5.5.6 2025-05-06 22:32:58 +08:00
common-ui chore: release v5.5.6 2025-05-06 22:32:58 +08:00
hooks feat(tabs): 支持计算属性作为标签标题,解决 #6170 的问题 (#6163) 2025-05-16 09:37:50 +08:00
layouts perf: perf the control logic of Tab (#6220) 2025-05-18 10:33:02 +08:00
plugins chore: release v5.5.6 2025-05-06 22:32:58 +08:00
request chore: release v5.5.6 2025-05-06 22:32:58 +08:00
README.md refactor: adjust all sample pages and use page components (#4118) 2024-08-11 20:05:52 +08:00

Effects 目录

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

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

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