mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-01 15:39:41 +08:00
37 lines
1.1 KiB
Vue
37 lines
1.1 KiB
Vue
<template>
|
|
<div id="main" class="relative flex h-screen overflow-hidden bg-bg pt-[32px]">
|
|
<InputBoxDialog />
|
|
<TitleBar />
|
|
<Navigation />
|
|
<main class="relative z-1 no-scrollbar h-screen flex-1 overflow-scroll bg-bg-secondary">
|
|
<div class="m-0 h-full max-w-none">
|
|
<router-view v-slot="{ Component, route }">
|
|
<transition name="page" mode="out-in">
|
|
<keep-alive :include="keepAlivePages">
|
|
<component :is="Component" :key="route.path" />
|
|
</keep-alive>
|
|
</transition>
|
|
</router-view>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { useRouter } from 'vue-router'
|
|
|
|
import InputBoxDialog from '@/components/InputBoxDialog.vue'
|
|
import Navigation from '@/components/NavigationPage.vue'
|
|
import TitleBar from '@/components/ui/TitleBar.vue'
|
|
|
|
const $router = useRouter()
|
|
const keepAlivePages = $router
|
|
.getRoutes()
|
|
.filter(item => item.meta.keepAlive)
|
|
.map(item => item.name as string)
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
export default { name: 'MainPage' }
|
|
</script>
|