mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-18 17:46:38 +08:00
27 lines
815 B
Vue
27 lines
815 B
Vue
<template>
|
|
<div
|
|
class="flex-1 flex-col-stretch p-16px bg-[#F6F9F8] dark:bg-black"
|
|
:class="{ 'overflow-hidden': routeProps.fullPage }"
|
|
>
|
|
<router-view v-slot="{ Component, route }">
|
|
<transition :name="theme.pageAnimateType" mode="out-in" appear>
|
|
<keep-alive :include="cacheRoutes">
|
|
<component :is="Component" v-if="reload" :key="route.fullPath" class="flex-1" />
|
|
</keep-alive>
|
|
</transition>
|
|
</router-view>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { useThemeStore } from '@/store';
|
|
import { useReloadInject } from '@/context';
|
|
import { cacheRoutes } from '@/router';
|
|
import { useRouteProps } from '@/hooks';
|
|
|
|
const theme = useThemeStore();
|
|
const { reload } = useReloadInject();
|
|
const routeProps = useRouteProps();
|
|
</script>
|
|
<style scoped></style>
|