This commit is contained in:
jxxghp
2024-07-06 17:53:51 +08:00
parent 81fb44da80
commit b2e1fe314f
13 changed files with 373 additions and 207 deletions
+3 -3
View File
@@ -1,18 +1,18 @@
<script lang="ts" setup>
import DefaultLayoutWithVerticalNav from './components/DefaultLayoutWithVerticalNav.vue'
import DefaultLayout from './components/DefaultLayout.vue'
const route = useRoute()
</script>
<template>
<DefaultLayoutWithVerticalNav>
<DefaultLayout>
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" v-if="route.meta.keepAlive" :key="route.fullPath" />
</keep-alive>
<component :is="Component" v-if="!route.meta.keepAlive" :key="route.fullPath" />
</router-view>
</DefaultLayoutWithVerticalNav>
</DefaultLayout>
</template>
<style lang="scss">