mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-11 02:51:01 +08:00
init
This commit is contained in:
55
admin/src/layout/default/components/header/index.vue
Normal file
55
admin/src/layout/default/components/header/index.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<header class="header">
|
||||
<div class="navbar">
|
||||
<div class="flex-1 flex">
|
||||
<div class="navbar-item">
|
||||
<fold />
|
||||
</div>
|
||||
<div class="navbar-item">
|
||||
<refresh />
|
||||
</div>
|
||||
<div class="flex items-center px-2" v-if="!isMobile && settingStore.showCrumb">
|
||||
<breadcrumb />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="navbar-item" v-if="!isMobile">
|
||||
<full-screen />
|
||||
</div>
|
||||
<div class="navbar-item">
|
||||
<user-drop-down />
|
||||
</div>
|
||||
<div class="navbar-item">
|
||||
<setting />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<multiple-tabs v-if="settingStore.openMultipleTabs" />
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useAppStore from '@/stores/modules/app'
|
||||
import Fold from './fold.vue'
|
||||
import Refresh from './refresh.vue'
|
||||
import Breadcrumb from './breadcrumb.vue'
|
||||
import FullScreen from './full-screen.vue'
|
||||
import UserDropDown from './user-drop-down.vue'
|
||||
import Setting from '../setting/index.vue'
|
||||
import MultipleTabs from './multiple-tabs.vue'
|
||||
|
||||
import useSettingStore from '@/stores/modules/setting'
|
||||
const appStore = useAppStore()
|
||||
const isMobile = computed(() => appStore.isMobile)
|
||||
const settingStore = useSettingStore()
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.navbar {
|
||||
height: var(--navbar-height);
|
||||
@apply flex px-2 bg-body;
|
||||
.navbar-item {
|
||||
@apply h-full flex justify-center items-center hover:bg-page;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user