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 {BellRing, Mail} from 'lucide-vue-next';
|
|
|
|
import SidebarRight from "~/components/SidebarRight.vue";
|
2024-06-22 10:54:02 +08:00
|
|
|
|
|
|
|
const {$gsap} = useNuxtApp()
|
|
|
|
const mainLayoutStore = useMainLayoutStore()
|
2024-07-02 14:28:15 +08:00
|
|
|
const home = ref({
|
|
|
|
icon: 'pi pi-home'
|
|
|
|
});
|
|
|
|
const router = useRouter()
|
|
|
|
const routes=computed(()=>{
|
|
|
|
const route=router.currentRoute.value.name as string
|
|
|
|
return route.split('-').map(x => {
|
|
|
|
return {
|
|
|
|
label: x.charAt(0).toUpperCase() + x.slice(1),
|
|
|
|
icon: 'pi pi-angle'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
2024-06-22 10:54:02 +08:00
|
|
|
const visibleRight = ref(false)
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<section class="title-bar-layout">
|
|
|
|
<Sidebar v-model:visible="visibleRight" header="通知" position="right">
|
|
|
|
<SidebarRight/>
|
|
|
|
</Sidebar>
|
|
|
|
<h1 class="name">
|
2024-07-02 14:28:15 +08:00
|
|
|
<Breadcrumb :home="home" :model="routes" />
|
2024-06-22 10:54:02 +08:00
|
|
|
</h1>
|
|
|
|
<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;
|
|
|
|
padding: 0 $padding*2;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.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>
|