Files
mayfly-go/frontend/src/layout/component/header.vue

27 lines
724 B
Vue
Raw Normal View History

<template>
<el-header class="layout-header" :height="setHeaderHeight">
<NavBarsIndex />
</el-header>
</template>
<script lang="ts">
import { computed } from 'vue';
2023-09-26 17:38:52 +08:00
import NavBarsIndex from '@/layout/navBars/index.vue';
2023-03-15 11:41:03 +08:00
import { useThemeConfig } from '@/store/themeConfig';
export default {
name: 'layoutHeader',
components: { NavBarsIndex },
setup() {
// 设置 header 的高度
const setHeaderHeight = computed(() => {
2023-03-15 11:41:03 +08:00
let { isTagsview, layout } = useThemeConfig().themeConfig;
if (isTagsview && layout !== 'classic') return '84px';
else return '50px';
});
return {
setHeaderHeight,
};
},
};
</script>