2022-01-08 17:20:46 +08:00
|
|
|
<template>
|
2022-04-18 22:01:30 +08:00
|
|
|
<n-layout has-sider style="height: 100%">
|
2022-05-08 11:59:01 +08:00
|
|
|
<n-layout-sider
|
|
|
|
|
bordered
|
|
|
|
|
collapse-mode="width"
|
|
|
|
|
:collapsed-width="64"
|
|
|
|
|
:width="220"
|
|
|
|
|
:native-scrollbar="false"
|
|
|
|
|
:collapsed="appStore.collapsed"
|
|
|
|
|
>
|
2022-04-18 22:01:30 +08:00
|
|
|
<SideBar />
|
|
|
|
|
</n-layout-sider>
|
|
|
|
|
<n-layout>
|
|
|
|
|
<n-layout-header :style="{ height: useTheme.header.height + 'px' }">
|
|
|
|
|
<AppHeader />
|
|
|
|
|
</n-layout-header>
|
2022-04-10 21:41:06 +08:00
|
|
|
|
2022-05-02 17:39:31 +08:00
|
|
|
<n-layout style="background-color: #f5f6fb" :style="`height: calc(100% - ${useTheme.header.height}px)`">
|
2022-04-18 22:01:30 +08:00
|
|
|
<AppTags v-if="useTheme.tags.visible" />
|
2022-05-02 17:39:31 +08:00
|
|
|
<AppMain
|
2022-05-06 22:36:22 +08:00
|
|
|
:style="{
|
|
|
|
|
height: `calc(100% - ${useTheme.tags.visible ? useTheme.tags.height : 0}px)`,
|
|
|
|
|
overflow: 'auto',
|
|
|
|
|
}"
|
2022-05-02 17:39:31 +08:00
|
|
|
/>
|
2022-01-08 17:20:46 +08:00
|
|
|
</n-layout>
|
|
|
|
|
</n-layout>
|
2022-04-18 22:01:30 +08:00
|
|
|
</n-layout>
|
2022-01-08 17:20:46 +08:00
|
|
|
</template>
|
2022-03-20 14:45:36 +08:00
|
|
|
|
2022-04-10 21:41:06 +08:00
|
|
|
<script setup>
|
|
|
|
|
import AppHeader from './components/header/index.vue'
|
|
|
|
|
import SideBar from './components/sidebar/index.vue'
|
|
|
|
|
import AppMain from './components/AppMain.vue'
|
|
|
|
|
import AppTags from './components/tags/index.vue'
|
|
|
|
|
import { useThemeStore } from '@/store/modules/theme'
|
2022-05-08 11:59:01 +08:00
|
|
|
import { useAppStore } from '@/store/modules/app'
|
2022-04-10 21:41:06 +08:00
|
|
|
|
|
|
|
|
const useTheme = useThemeStore()
|
2022-05-08 11:59:01 +08:00
|
|
|
const appStore = useAppStore()
|
2022-04-10 21:41:06 +08:00
|
|
|
</script>
|
|
|
|
|
|
2022-03-20 14:45:36 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.n-layout-header {
|
|
|
|
|
height: 60px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
|
border-left: 1px solid #eee;
|
|
|
|
|
}
|
|
|
|
|
</style>
|