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

@@ -1,5 +1,5 @@
<template>
<div style="padding: 30px">
<div p-30px>
<el-link
href="https://gitee.com/youlaiorg/vue3-element-admin/blob/master/src/views/demo/multi-level/level1.vue"
type="primary"
@@ -9,8 +9,13 @@
示例源码 请点击>>>>
</el-link>
<el-alert :closable="false" title="菜单一级">
<router-view />
</el-alert>
<div flex flex-col gap-20px>
<el-alert :closable="false" title="菜单一级" />
<KeepCache />
</div>
</div>
</template>
<script setup lang="ts">
import KeepCache from "@/components/KeepCache/index.vue";
defineOptions({ name: "MultiLevel1" });
</script>