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

View File

@@ -41,6 +41,6 @@ onBeforeMount(async () => {
<template>
<VApp>
<RouterView :key="route.fullPath" />
<RouterView />
</VApp>
</template>

View File

@@ -6,14 +6,14 @@ import DefaultLayoutWithVerticalNav from './components/DefaultLayoutWithVertical
<DefaultLayoutWithVerticalNav>
<router-view v-slot="{ Component }">
<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>
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.name" />
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.fullPath" />
</router-view>
</DefaultLayoutWithVerticalNav>
</template>
<style lang="scss">
// As we are using `layouts` plugin we need its styles to be imported
@use '@layouts/styles/default-layout';
@use "@layouts/styles/default-layout";
</style>