UnisKB/ui/src/layout/components/top-bar/index.vue

47 lines
1.1 KiB
Vue
Raw Normal View History

2023-09-15 09:40:35 +00:00
<template>
2023-10-18 11:06:22 +00:00
<div class="top-bar-container flex-between border-b">
2023-10-13 08:11:54 +00:00
<div class="flex-center h-full">
<div class="app-title-container flex-center">
<div class="app-title-icon"></div>
2023-10-18 11:06:22 +00:00
<div class="app-title-text ml-10">{{ defaultTitle }}</div>
2023-10-13 08:11:54 +00:00
</div>
<el-divider direction="vertical" class="line" />
2023-09-15 09:40:35 +00:00
<TopMenu></TopMenu>
</div>
<div class="avatar">
<Avatar></Avatar>
</div>
</div>
</template>
<script setup lang="ts">
2023-10-16 10:58:51 +00:00
import TopMenu from './top-menu/index.vue'
import Avatar from './avatar/index.vue'
2023-10-12 08:36:16 +00:00
const defaultTitle = import.meta.env.VITE_APP_TITLE
2023-09-15 09:40:35 +00:00
</script>
<style lang="scss">
.top-bar-container {
2023-10-13 08:11:54 +00:00
height: var(--app-header-height);
box-sizing: border-box;
padding: var(--app-header-padding);
2023-09-15 09:40:35 +00:00
.app-title-container {
2023-10-18 11:06:22 +00:00
margin-right: 20px;
2023-09-15 09:40:35 +00:00
.app-title-icon {
background-image: url('@/assets/logo.png');
background-size: 100% 100%;
2023-10-12 08:36:16 +00:00
width: 40px;
height: 40px;
2023-09-15 09:40:35 +00:00
}
.app-title-text {
2023-10-13 08:11:54 +00:00
color: var(--el-color-primary);
2023-10-12 08:36:16 +00:00
font-size: 20px;
2023-09-15 09:40:35 +00:00
font-weight: 600;
}
}
2023-10-13 08:11:54 +00:00
.line {
height: 2em;
}
2023-09-15 09:40:35 +00:00
}
</style>