feat(shell): add app shell and maintenance page driver

Introduce reusable shell components for layout, tabs, and global overlays.
Add maintenance page model, wrapper component, and composable driver to
standardize maintenance page state, search, and pagination handling.feat(shell): add app shell and maintenance page driver

Introduce reusable shell components for layout, tabs, and global overlays.
Add maintenance page model, wrapper component, and composable driver to
standardize maintenance page state, search, and pagination handling.
This commit is contained in:
skytek_xinliang
2026-05-19 11:35:01 +08:00
parent 005ba663d6
commit 9ae91418e0
9 changed files with 456 additions and 13 deletions
+35
View File
@@ -0,0 +1,35 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import MainLayout from '@/components/layouts/MainLayout.vue'
import PlainLayout from '@/components/layouts/PlainLayout.vue'
import AppTabs from './AppTabs.vue'
import GlobalOverlays from './GlobalOverlays.vue'
import type { LayoutMenuItem } from '@/stores/menu'
defineProps<{
menuItems?: LayoutMenuItem[]
}>()
const route = useRoute()
const layoutMap = {
default: MainLayout,
none: PlainLayout,
}
const activeLayout = computed(
() => layoutMap[route.meta.layout as 'default' | 'none'] || MainLayout
)
const showTabs = computed(() => route.meta.layout === 'default')
</script>
<template>
<component :is="activeLayout">
<AppTabs :menu-items="menuItems" :show-tabs="showTabs">
<slot />
</AppTabs>
</component>
<GlobalOverlays :menu-items="menuItems" @search-select="$emit('searchSelect', $event)" />
</template>