🐛 Fixing a bug. 修改路由缓存问题

This commit is contained in:
aeizzz 2023-03-08 17:24:35 +08:00
parent b90d5ef043
commit db943d5143

View File

@ -2,10 +2,13 @@
<div class="layout-parent">
<router-view v-slot="{ Component }">
<transition :name="setTransitionName" mode="out-in">
<keep-alive :include="getKeepAliveNames">
<component :is="Component" :key="state.refreshRouterViewKey" class="w100" v-show="!isIframePage" />
<keep-alive>
<component :is="Component" :key="state.refreshRouterViewKey" class="w100" v-show="!isIframePage" v-if="route.meta.isKeepAlive" />
</keep-alive>
</transition>
<transition :name="setTransitionName" mode="out-in">
<component :is="Component" :key="state.refreshRouterViewKey" class="w100" v-show="!isIframePage" v-if="!route.meta.isKeepAlive" />
</transition>
</router-view>
<transition :name="setTransitionName" mode="out-in">
<Iframes class="w100" v-show="isIframePage" :refreshKey="state.iframeRefreshKey" :name="setTransitionName" :list="state.iframeList" />