UnisKB/ui/src/layout/layout-template/SimpleLayout.vue

36 lines
961 B
Vue
Raw Normal View History

2025-04-30 06:53:42 +00:00
<script setup lang="ts">
2025-06-20 19:55:48 +00:00
import { computed } from 'vue'
2025-04-30 06:53:42 +00:00
import UserHeader from '@/layout/layout-header/UserHeader.vue'
2025-07-02 14:41:33 +00:00
import SystemHeader from '@/layout/layout-header/SystemHeader.vue'
2025-04-30 06:53:42 +00:00
import AppMain from '@/layout/app-main/index.vue'
2025-06-20 19:55:48 +00:00
import useStore from '@/stores'
2025-07-02 14:41:33 +00:00
import { useRoute } from 'vue-router'
const route = useRoute()
2025-06-20 19:55:48 +00:00
const { theme } = useStore()
const isDefaultTheme = computed(() => {
return theme.isDefaultTheme()
})
2025-07-02 14:41:33 +00:00
const {
params: { folderId }, // id为knowledgeID
query: { type },
} = route as any
const isShared = computed(() => {
return folderId === 'shared' || type === 'systemShare'
})
2025-04-30 06:53:42 +00:00
</script>
<template>
<div class="app-layout">
2025-06-20 19:55:48 +00:00
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
2025-07-02 14:41:33 +00:00
<SystemHeader v-if="isShared"></SystemHeader>
<UserHeader v-else />
2025-04-30 06:53:42 +00:00
</div>
<div class="app-main">
<AppMain />
</div>
</div>
</template>
<style lang="scss">
@use './index.scss';
</style>