Navbar.vue
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<div class="navbar" :class="slideClass">
<logo />
<Menu class="main-menu" />
<NavbarRight />
</div>
</template>
<script>
import { mapState } from 'vuex'
import Logo from './Logo'
import Menu from './menu'
import NavbarRight from '../components/NavbarRight'
export default {
components: { Logo, Menu, NavbarRight },
computed: {
...mapState({
slideClass: state => state.settings.slideClass,
})
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.navbar {
height: $headerHeight;
overflow: hidden;
position: relative;
border-bottom: 1px solid #dcdfe6;
box-sizing: border-box;
display: flex;
align-items: center;
.main-menu {
flex: 1;
overflow: hidden;
height: $headerHeight;
}
&.lightWhite {
background: #fff;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
&.dark {
background: #161618;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
::v-deep .right-menu .right-menu-item {
color: rgba(255, 255, 255, 0.85);
}
}
::v-deep .right-menu {
margin-left: auto;
float: none;
height: $headerHeight;
flex-shrink: 0;
}
}
</style>