mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(components): blankLayout引入GlobalContent
This commit is contained in:
@ -1,31 +1,14 @@
|
||||
<template>
|
||||
<n-scrollbar ref="scrollbar" class="h-full" :content-class="routeProps.fullPage ? 'h-full' : ''">
|
||||
<div class="inline-block wh-full bg-[#f6f9f8] dark:bg-dark">
|
||||
<router-view v-slot="{ Component, route: itemRoute }">
|
||||
<transition :name="theme.pageAnimateType" mode="out-in" appear>
|
||||
<keep-alive :include="cacheRoutes">
|
||||
<component
|
||||
:is="Component"
|
||||
v-if="app.reloadFlag"
|
||||
:key="itemRoute.fullPath"
|
||||
:class="{ 'min-h-100vh': !routeProps.fullPage }"
|
||||
/>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
<n-scrollbar ref="scrollbar" class="h-full" :content-style="scrollbarContentStyle">
|
||||
<global-content :show-padding="false" />
|
||||
</n-scrollbar>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NScrollbar } from 'naive-ui';
|
||||
import { useThemeStore, useAppStore } from '@/store';
|
||||
import { cacheRoutes } from '@/router';
|
||||
import { useRouteProps } from '@/composables';
|
||||
import { useLayoutConfig } from '@/composables';
|
||||
import { GlobalContent } from '../common';
|
||||
|
||||
const theme = useThemeStore();
|
||||
const app = useAppStore();
|
||||
|
||||
const routeProps = useRouteProps();
|
||||
const { scrollbarContentStyle } = useLayoutConfig();
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user