feat(projects): 添加exception页面:403,404,500

This commit is contained in:
Soybean
2021-09-09 18:40:38 +08:00
parent ff4a09c452
commit d012c4ecf2
30 changed files with 7896 additions and 38 deletions

View File

@ -4,8 +4,11 @@
<global-header v-if="isHorizontalMix" :z-index="2" />
<div class="flex-1-hidden flex h-full">
<global-sider v-if="isHorizontalMix" class="sider-margin" :z-index="1" />
<n-scrollbar class="h-full" :x-scrollable="true">
<div class="inline-flex-col-stretch w-full min-h-100vh" :class="{ 'content-padding': isHorizontalMix }">
<n-scrollbar class="h-full" :x-scrollable="true" :content-class="fullPage ? 'h-full' : ''">
<div
class="inline-flex-col-stretch w-full"
:class="[{ 'content-padding': isHorizontalMix }, fullPage ? 'h-full' : 'min-h-100vh']"
>
<global-header v-if="!isHorizontalMix" :z-index="1" />
<n-layout-content class="flex-auto" :class="{ 'bg-[#f5f7f9]': !theme.darkMode }">
<router-view />
@ -20,16 +23,21 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { NLayout, NScrollbar, NLayoutContent } from 'naive-ui';
import { useThemeStore } from '@/store';
import { GlobalSider, GlobalHeader, GlobalFooter, SettingDrawer } from './components';
const route = useRoute();
const theme = useThemeStore();
const isHorizontalMix = computed(() => theme.navStyle.mode === 'horizontal-mix');
const headerHeight = computed(() => {
const { height } = theme.headerStyle;
return `${height}px`;
});
/** 100%视高 */
const fullPage = computed(() => Boolean(route.meta?.fullPage));
</script>
<style scoped>
:deep(.n-scrollbar-rail) {

View File

@ -0,0 +1,6 @@
<template>
<router-view />
</template>
<script lang="ts" setup></script>
<style scoped></style>

View File

@ -1,12 +1,18 @@
<template>
<n-scrollbar class="h-full" :x-scrollable="true">
<div class="inline-block w-full min-h-100vh">
<n-scrollbar class="h-full" :x-scrollable="true" :content-class="fullPage ? 'h-full' : ''">
<div class="inline-block w-full" :class="[fullPage ? 'h-full' : 'min-h-100vh']">
<router-view />
</div>
</n-scrollbar>
</template>
<script lang="ts" setup>
import { useRoute } from 'vue-router';
import { NScrollbar } from 'naive-ui';
import { computed } from 'vue';
const route = useRoute();
/** 100%视高 */
const fullPage = computed(() => Boolean(route.meta?.fullPage));
</script>
<style scoped></style>

View File

@ -1,4 +1,5 @@
import BasicLayout from './BasicLayout/index.vue';
import BlankLayout from './BlankLayout/index.vue';
import BlankChildLayout from './BlankChildLayout/index.vue';
export { BasicLayout, BlankLayout };
export { BasicLayout, BlankLayout, BlankChildLayout };