Skip to content

Commit 503ea6a

Browse files
committed
修改顶部导航样式
1 parent 7ca4a11 commit 503ea6a

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed

src/components/Layout.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="layout">
2+
<div class="layout ">
33
<div class="layout-menu-left">
44
<layout-sidebar/>
55
</div>
@@ -37,6 +37,14 @@
3737
position: relative;
3838
overflow: hidden;
3939
display: -webkit-box;
40+
&.hideSidebar {
41+
>.layout-menu-left {
42+
width: 50px;
43+
>.sidebar-container {
44+
width:50px;
45+
}
46+
}
47+
}
4048
}
4149
.layout-menu-left{
4250
width: 200px;

src/components/Layout/Navbar.vue

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="layout-header">
3-
<span class="toggle" @click="toggleClick"><i class="fa fa-sliders"></i></span>
3+
<a class="toggle" @click="toggleClick"><i class="fa fa-sliders"></i></a>
44
<el-menu default-active="1" class="el-menu-navbar" mode="horizontal">
55
<el-menu-item index="1"> <i class="fa fa-archive"></i> 系统</el-menu-item>
66
<el-menu-item index="2"> <i class="fa fa-archive"></i> CMS</el-menu-item>
@@ -20,28 +20,34 @@
2020
</script>
2121
<style lang="scss" scoped>
2222
.layout-header{
23-
background: #fff;
23+
background-color: #dd4b39;
2424
box-shadow: 0 1px 1px rgba(0,0,0,.1);
2525
display: -webkit-box;
2626
}
2727
.toggle{
2828
display: -webkit-box;
29-
margin: 15px;
29+
padding: 9px;
3030
font-size: 22px;
31-
:hover{
32-
color: #20a0ff;
31+
color: #fff;
32+
&:hover{
33+
background-color: #d73925;
34+
border-bottom: 2px solid #fff;
3335
}
3436
}
3537
.el-menu-item{
38+
line-height: 50px;
39+
height: 50px;
40+
color: #fff;
3641
border-bottom: 2px solid transparent;
42+
&:hover{
43+
background-color: #d73925;
44+
border-bottom: 2px solid #fff;
45+
}
3746
}
3847
.el-menu-item.is-active{
39-
border-bottom: 2px solid #20a0ff;
40-
}
41-
.el-menu-item:hover{
42-
border-bottom: 2px solid #20a0ff;
48+
border-bottom: 2px solid #fff;
4349
}
4450
.el-menu{
45-
background-color: #fff;
51+
background-color: #dd4b39;
4652
}
4753
</style>

src/components/Layout/Sidebar.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<el-menu default-active="1-4-1" theme="dark">
3-
<div class="layout-logo-left">CoreCMF 后台管理</div>
2+
<el-menu default-active="1-4-1" theme="dark" class="sidebar-container">
3+
<div class="layout-logo-left">CoreCMF</div>
44
<el-submenu index="1">
55
<template slot="title">导航一</template>
66
<el-menu-item-group title="分组一">
@@ -55,16 +55,15 @@
5555
<style lang="scss" scoped>
5656
@import './../../assets/sass/mixin.scss';
5757
.layout-logo-left {
58-
background: #5b6270;
59-
border-radius: 3px;
58+
background-color: #d73925;
59+
height: 50px;
60+
line-height: 50px;
61+
font-size: 20px;
6062
color: #fff;
61-
height: 30px;
62-
line-height: 30px;
63-
margin: 15px auto;
6463
text-align: center;
65-
width: 90%;
64+
width: 100%;
6665
}
67-
.el-menu {
66+
.sidebar-container {
6867
position: fixed;
6968
width:200px;
7069
min-height: 100%;

0 commit comments

Comments
 (0)