优化
This commit is contained in:
3
monisuo-admin/src/layouts/blank.vue
Normal file
3
monisuo-admin/src/layouts/blank.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<router-view />
|
||||
</template>
|
||||
47
monisuo-admin/src/layouts/default.vue
Normal file
47
monisuo-admin/src/layouts/default.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<script setup lang="ts">
|
||||
import { useCookies } from '@vueuse/integrations/useCookies'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
import AppSidebar from '@/components/app-sidebar/index.vue'
|
||||
import CommandMenuPanel from '@/components/command-menu-panel/index.vue'
|
||||
import ThemePopover from '@/components/custom-theme/theme-popover.vue'
|
||||
import LanguageChange from '@/components/language-change.vue'
|
||||
import ToggleTheme from '@/components/toggle-theme.vue'
|
||||
import { SIDEBAR_COOKIE_NAME } from '@/components/ui/sidebar/utils'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useThemeStore } from '@/stores/theme'
|
||||
|
||||
const defaultOpen = useCookies([SIDEBAR_COOKIE_NAME])
|
||||
const themeStore = useThemeStore()
|
||||
const { contentLayout } = storeToRefs(themeStore)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UiSidebarProvider :default-open="defaultOpen.get(SIDEBAR_COOKIE_NAME)">
|
||||
<AppSidebar />
|
||||
<UiSidebarInset class="w-full max-w-full peer-data-[state=collapsed]:w-[calc(100%-var(--sidebar-width-icon)-1rem)] peer-data-[state=expanded]:w-[calc(100%-var(--sidebar-width))]">
|
||||
<header
|
||||
class="flex items-center gap-3 sm:gap-4 h-16 p-4 shrink-0 transition-[width,height] ease-linear"
|
||||
>
|
||||
<UiSidebarTrigger class="-ml-1" />
|
||||
<UiSeparator orientation="vertical" class="h-6" />
|
||||
<CommandMenuPanel />
|
||||
<div class="flex-1" />
|
||||
<div class="ml-auto flex items-center space-x-4">
|
||||
<LanguageChange />
|
||||
<ToggleTheme />
|
||||
<ThemePopover />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main
|
||||
:class="cn(
|
||||
'p-4 grow',
|
||||
contentLayout === 'centered' ? 'container mx-auto ' : '',
|
||||
)"
|
||||
>
|
||||
<router-view />
|
||||
</main>
|
||||
</UiSidebarInset>
|
||||
</UiSidebarProvider>
|
||||
</template>
|
||||
18
monisuo-admin/src/layouts/marketing.vue
Normal file
18
monisuo-admin/src/layouts/marketing.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
import Footer from '@/components/marketing-layout/the-footer.vue'
|
||||
import Header from '@/components/marketing-layout/the-header.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container mx-auto ">
|
||||
<div class="mx-2 lg:p-0">
|
||||
<Header />
|
||||
|
||||
<main>
|
||||
<router-view />
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user