17.侧边栏和封装侧边栏组件

This commit is contained in:
xuewuerduo 2024-07-16 22:17:12 +08:00
parent 92d9944b50
commit 5fd662d308
3 changed files with 108 additions and 8 deletions

View File

@ -15,22 +15,87 @@ a {
ul,
li {
list-style: none;
list-style-type: none;
}
/*.dr-home */
/* .dr-home */
.dr-home {
display: flex;
flex-direction: column; /* 容器内元素从上至下排列 */
flex-direction: column; /* 容器内元素从上至下排列 */
height: 100vh;
}
/* .dr-home .header */
.dr-home .header {
display: flex;
height: 55px;
background: #393d49;
}
.dr-home .header .title {
display: flex;
width: 200px;
background: #0c0c0c;
}
.dr-home .header .title .logo {
display: flex;
justify-content: center;
align-items: center;
width: 60px;
}
.dr-home .header .title .logo i {
color: lightslategray;
font-size: 30px;
}
.dr-home .header .title .text {
display: flex;
align-items: center;
flex: 1;
}
.dr-home .header .title .text a {
color: lightslategray;
font-size: 18px;
font-weight: bold;
}
.dr-home .header .info {
display: flex;
justify-content: flex-end;
flex: 1;
}
.dr-home .header .info .admin {
display: flex;
color: #fff;
font-size: 15px;
}
.dr-home .header .info .admin .name {
padding-right: 10px;
height: 55px;
line-height: 55px;
text-align: center;
}
.dr-home .header .info .admin .name i {
color: #FF5722;
font-size: 13px;
}
.dr-home .header .info .admin .exit {
width: 90px;
height: 55px;
line-height: 55px;
text-align: center;
background: #555c64;
cursor: pointer;
}
/* .dr-home .main */
.dr-home .main {
display: flex;
height: calc(100vh - 55px); /* 减去 header 高度 */

View File

@ -0,0 +1,34 @@
<template>
<div class="header">
<div class="title">
<div class="logo">
<el-icon><MostlyCloudy /></el-icon>
</div>
<div class="text">
<a href="/admin">李龙龙编程</a>
</div>
</div>
<div class="info">
<div class="admin">
<div class="name">
<span>李龙龙</span>
<el-icon><Bell /></el-icon>
</div>
<div class="exit">
退出
</div>
</div>
</div>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,14 +1,15 @@
<script setup>
import '@/assets/admin/css/home.css' //
import '@/assets/admin/css/home.css' //
import HomeSide from "@/components/admin/home/HomeSide.vue";
import HomeHeader from "@/components/admin/home/HomeHeader.vue";
import {HomeFilled} from "@element-plus/icons-vue";
</script>
<template>
<div class="dr-home">
<div class="header">
</div>
<HomeHeader />
<div class="main">
<HomeSide />