LoongPanel-Asp/web/components/shell/TitleBar.vue

111 lines
2.1 KiB
Vue
Raw Normal View History

2024-06-22 10:54:02 +08:00
<script lang="ts" setup>
import {useMainLayoutStore} from "~/strores/UseMainLayoutStore";
2024-07-02 14:28:15 +08:00
import SidebarRight from "~/components/SidebarRight.vue";
2024-07-22 18:41:15 +08:00
import { Signature } from 'lucide-vue-next';
2024-06-22 10:54:02 +08:00
2024-07-02 14:28:15 +08:00
const router = useRouter()
const routes=computed(()=>{
const route=router.currentRoute.value.name as string
return route.split('-').map(x => {
2024-07-22 18:41:15 +08:00
return x.charAt(0).toUpperCase() + x.slice(1)
2024-07-02 14:28:15 +08:00
})
})
2024-06-22 10:54:02 +08:00
const visibleRight = ref(false)
2024-07-22 18:41:15 +08:00
const value=ref()
const options = ref(['@gmail.com', '@outlook.com', '@yahoo.com'])
2024-06-22 10:54:02 +08:00
</script>
<template>
<section class="title-bar-layout">
2024-07-22 18:41:15 +08:00
<n-auto-complete
v-model:value="value"
:input-props="{
autocomplete: 'disabled',
}"
:options="options"
placeholder="搜索"
clearable
/>
2024-06-22 10:54:02 +08:00
<div class="action">
2024-07-02 14:28:15 +08:00
<Icon name="BellRing" @click="visibleRight=true" :stroke-width="1.5" :size="20"/>
<Icon name="Mail" :stroke-width="1.5" :size="20"/>
2024-06-22 10:54:02 +08:00
</div>
<div class="user">
<UserMini/>
</div>
</section>
</template>
<style lang="scss" scoped>
@import "base";
.title-bar-layout {
grid-area: titlebar;
background: $light-bg-color;
display: grid;
grid-template-columns: auto 1fr auto auto;
grid-template-rows: 1fr;
align-items: center;
2024-07-22 21:05:18 +08:00
padding: 0 $padding*2;
border-bottom: $border;
2024-06-22 10:54:02 +08:00
gap: $gap*2;
2024-07-02 14:28:15 +08:00
@include SC_Font();
2024-06-22 10:54:02 +08:00
.dark-mode & {
background: $dark-bg-color;
2024-07-22 21:05:18 +08:00
border-bottom: $border-dark;
2024-06-22 10:54:02 +08:00
}
}
2024-07-22 18:41:15 +08:00
:deep(.n-breadcrumb){
ul{
display: flex;
padding: 0;
align-content: center;
li>span{
font-size: 16px;
font-weight: 800;
}
}
}
2024-06-22 10:54:02 +08:00
.name {
font-weight: 700;
font-size: 26px;
color: $light-text-color;
.dark-mode & {
color: $dark-text-color;
}
}
.user {
grid-column: 4;
}
.action {
display: flex;
gap: $gap*2;
grid-column: 3;
2024-07-02 14:28:15 +08:00
svg{
cursor: pointer;
stroke: rgba(51, 51, 51, 0.5);
&:hover{
stroke: $light-text-color;
}
.dark-mode &{
stroke: rgba(255, 255, 255, 0.5);
&:hover{
stroke: $dark-text-color;
}
}
}
}
:deep(.p-breadcrumb){
background: unset;
.p-menuitem-text{
color: #D3D3D3;
}
2024-06-22 10:54:02 +08:00
}
</style>