liuyun eed300474e
Some checks are pending
CI / backend (push) Waiting to run
CI / frontend (push) Waiting to run
docs(spec): 归档 multi-tab-keep-alive + 同步布局多页签 keep-alive 主 spec
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 22:13:47 +08:00

17 lines
793 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1. 页面 name
- [x] 1.1 给 11 个菜单页面补 `defineOptions({ name })`(`/`→dashboard、`/system/{user,role,resource,org,tenant,dict,config}`→末段、`/monitor/{audit,login-log,session}`→末段)
## 2. tabs store 辅助
- [x] 2.1 `stores/modules/tabs.ts`:`TabItem` 加 `keepAlive` 字段;导出 `pathToName(path)`(`/`→dashboard,其余取路径末段 kebab)
## 3. 布局 keep-alive
- [x] 3.1 `layouts/default.vue` 用 `<keep-alive :include="cachedNames">` 包裹 router-view;`cachedNames` = 打开且 keepAlive 的页签 name 集合;`addTab` 传 `route.meta.keepAlive !== false`;`:key="route.path"`
## 4. 验证
- [x] 4.1 前端 type-check 通过
- [x] 4.2 冒烟:默认页签切换保留状态;声明 `meta.keepAlive:false` 的页面切换重建