update src/layout/components/AppMain.vue.

解决点击菜单时页面空白或者整个页面重新刷新的问题

Signed-off-by: 周旭湘 <3423729430@qq.com>
This commit is contained in:
周旭湘 2024-05-07 09:13:35 +00:00 committed by Gitee
parent cc9b67d467
commit 6a738dffcc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

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