UnisKB/ui/src/layout/components/app-header/index.vue

30 lines
624 B
Vue
Raw Normal View History

2024-07-15 06:09:01 +00:00
<template>
2024-07-15 10:08:02 +00:00
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
<TopBar />
2024-07-15 06:09:01 +00:00
</div>
</template>
<script setup lang="ts">
2024-07-15 10:08:02 +00:00
import { ref, computed, onMounted } from 'vue'
2024-07-15 06:09:01 +00:00
import TopBar from '../top-bar/index.vue'
import useStore from '@/stores'
2024-07-16 09:32:27 +00:00
const { user } = useStore()
2024-07-15 10:08:02 +00:00
const isDefaultTheme = computed(() => {
2024-07-16 09:32:27 +00:00
return user.isDefaultTheme()
2024-07-15 10:08:02 +00:00
})
2024-07-15 06:09:01 +00:00
</script>
<style lang="scss" scoped>
.app-header {
background: var(--app-header-bg-color);
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 100;
}
2024-07-15 10:08:02 +00:00
.custom-header {
background: var(--el-color-primary-light-9) !important;
}
2024-07-15 06:09:01 +00:00
</style>