Skip to content

Commit 05e19eb

Browse files
committed
头部导航
1 parent c719831 commit 05e19eb

File tree

2 files changed

+52
-16
lines changed

2 files changed

+52
-16
lines changed

src/components/menus/Menus.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ export default {
5252
top: 70px;
5353
bottom: 0;
5454
overflow-y: scroll;
55-
box-shadow: 0 0 1.2em rgba(0, 0, 0, 0.12);
5655
}
5756
.sidebar::-webkit-scrollbar {
5857
width: 0;
5958
}
6059
.sidebar-el-menu {
6160
height: calc(100vh - 50px);
61+
box-shadow: 0 0 1.2em rgba(0, 0, 0, 0.12);
6262
}
6363
.sidebar-el-menu:not(.el-menu--collapse) {
64-
width: 230px;
64+
width: 240px;
6565
}
6666
.sidebar > ul {
6767
height: 100%;

src/layout/header/Index.vue

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
<template>
22
<div class="app-header">
33
<div class="logo">
4-
<router-link to="/">XX公司权限管理平台</router-link>
4+
<router-link to="/">
5+
<div
6+
class="log1"
7+
v-if="sidebarOpened"
8+
></div>
9+
<div
10+
class="log2"
11+
v-else
12+
></div>
13+
</router-link>
514
</div>
615
<!-- 头部切换左侧菜单 -->
716
<div
@@ -10,11 +19,11 @@
1019
>
1120
<i
1221
v-if="sidebarOpened"
13-
class="el-icon-s-fold"
22+
class="trigger el-icon-s-fold"
1423
></i>
1524
<i
1625
v-else
17-
class="el-icon-s-unfold"
26+
class="trigger el-icon-s-unfold"
1827
></i>
1928
</div>
2029
<!-- 头部导航 -->
@@ -82,19 +91,46 @@ export default {
8291
flex-direction: row;
8392
line-height: 50px;
8493
color: #fff;
85-
.menus {
86-
width: 30px;
87-
height: 30px;
88-
font-size: 25px;
89-
padding: 0 21px;
90-
cursor: pointer;
91-
}
9294
.logo {
93-
width: 240px;
94-
height: inherit;
95+
height: 50px;
96+
display: flex;
97+
flex-direction: column;
98+
justify-content: center;
99+
align-items: center;
100+
transition: width 0.3s;
101+
.log1 {
102+
width: 240px;
103+
height: 40px;
104+
background: rgba(255, 255, 255, 0.2);
105+
}
106+
.log2 {
107+
width: 65px;
108+
height: 40px;
109+
background: rgba(255, 255, 255, 0.2);
110+
}
111+
}
112+
.menus {
113+
width: 50px;
114+
height: 50px;
95115
text-align: center;
96-
a {
97-
text-decoration: none;
116+
line-height: 50px;
117+
display: flex;
118+
flex-direction: column;
119+
justify-content: center;
120+
align-items: center;
121+
margin-left: 5px;
122+
.trigger {
123+
color: #fff;
124+
font-size: 30px;
125+
width: 35px;
126+
height: 35px;
127+
padding: 5px;
128+
margin-top: 4px;
129+
cursor: pointer;
130+
transition: color 0.3s;
131+
}
132+
.trigger:hover {
133+
background: #40a9ff;
98134
color: #fff;
99135
}
100136
}

0 commit comments

Comments
 (0)