feat: (keep-alive)优化页面缓存机制

- 重构 AppMain 组件,引入 KeepCache 组件实现统一缓存

- 新增 DemoDetail 组件作为缓存测试页面

- 更新 TagsView 组件,优化缓存路由逻辑

- 修改 permission.store.ts,增加 allCacheRoutes 状态管理

- 更新 tags-view.store.ts,实现缓存路由的动态设置

- 调整多级菜单示例,支持缓存功能
This commit is contained in:
zimo493
2025-08-14 09:40:48 +08:00
parent f557f2e5ad
commit d90ccb248c
11 changed files with 189 additions and 24 deletions

View File

@@ -64,6 +64,12 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import("@/views/system/notice/components/MyNotice.vue"),
meta: { title: "我的通知", icon: "user", hidden: true },
},
{
path: "/detail/:id(\\d+)",
name: "DemoDetail",
component: () => import("@/views/demo/detail.vue"),
meta: { title: "详情页缓存", icon: "user", hidden: true, keepAlive: true },
},
],
},
];