fix: 🐛 (keep-alive)重构缓存机制
- 移除 KeepCache 组件,直接在 AppMain 中实现缓存逻辑 - 将 fullPath 做为组件缓存的 name
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
<template>
|
||||
<router-view>
|
||||
<template #default="{ Component, route }">
|
||||
<transition enter-active-class="animate__animated animate__fadeIn" mode="out-in">
|
||||
<keep-alive :include="tagsViewStore.cachedViews">
|
||||
<component :is="Component" :key="route.path" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</template>
|
||||
</router-view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
defineOptions({ name: "KeepCache" });
|
||||
|
||||
import { useTagsViewStore } from "@/store";
|
||||
|
||||
const tagsViewStore = useTagsViewStore();
|
||||
</script>
|
||||
Reference in New Issue
Block a user