mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 16:16:42 +08:00
修复keep-alive
This commit is contained in:
+1
-1
@@ -41,6 +41,6 @@ onBeforeMount(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VApp>
|
<VApp>
|
||||||
<RouterView :key="route.fullPath" />
|
<RouterView />
|
||||||
</VApp>
|
</VApp>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import DefaultLayoutWithVerticalNav from './components/DefaultLayoutWithVertical
|
|||||||
<DefaultLayoutWithVerticalNav>
|
<DefaultLayoutWithVerticalNav>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="Component" v-if="$route.meta.keepAlive" :key="$route.name" />
|
<component :is="Component" v-if="$route.meta.keepAlive" :key="$route.fullPath" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.name" />
|
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.fullPath" />
|
||||||
</router-view>
|
</router-view>
|
||||||
</DefaultLayoutWithVerticalNav>
|
</DefaultLayoutWithVerticalNav>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// As we are using `layouts` plugin we need its styles to be imported
|
// As we are using `layouts` plugin we need its styles to be imported
|
||||||
@use '@layouts/styles/default-layout';
|
@use "@layouts/styles/default-layout";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user