update src/layout/components/AppMain.vue.

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

Signed-off-by: 周旭湘 <3423729430@qq.com>
This commit is contained in:
周旭湘 2024-05-07 09:39:43 +00:00 committed by Gitee
parent 935a199f71
commit 907dc4efb4
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">
<component :is="Component" v-if="!route.meta.link" :key="route.path" />
<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 />