Merge pull request #37 from cikezhu/main

This commit is contained in:
jxxghp
2023-09-16 16:37:24 +08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -41,6 +41,6 @@ onBeforeMount(async () => {
<template> <template>
<VApp> <VApp>
<RouterView :key="route.fullPath" /> <RouterView />
</VApp> </VApp>
</template> </template>
+3 -3
View File
@@ -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>