fix 修复 从无缓存页面切换到有缓存页面 缓存失效问题

This commit is contained in:
疯狂的狮子Li
2025-06-16 13:49:24 +08:00
parent 1034399fe4
commit 48b5d595df

View File

@@ -1,14 +1,11 @@
<template>
<section class="app-main">
<router-view v-slot="{ Component, route }">
<transition v-if="!route.meta.noCache" :enter-active-class="animate" mode="out-in">
<keep-alive v-if="!route.meta.noCache" :include="tagsViewStore.cachedViews">
<transition :enter-active-class="animate" mode="out-in">
<keep-alive :include="tagsViewStore.cachedViews">
<component :is="Component" v-if="!route.meta.link" :key="route.path" />
</keep-alive>
</transition>
<transition v-if="route.meta.noCache" :enter-active-class="animate" mode="out-in">
<component :is="Component" v-if="!route.meta.link && route.meta.noCache" :key="route.path" />
</transition>
</router-view>
<iframe-toggle />
</section>