You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
2.7 KiB
128 lines
2.7 KiB
<template>
|
|
<div class="navbar">
|
|
<hamburger
|
|
:toggle-click="toggleSideBar"
|
|
:is-active="sidebar.opened"
|
|
class="hamburger-container"
|
|
/>
|
|
<breadcrumb class="breadcrumb-container" />
|
|
|
|
<right-menu></right-menu>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapGetters } from "vuex";
|
|
import Breadcrumb from "@/components/Breadcrumb";
|
|
import Hamburger from "@/components/Hamburger";
|
|
import Screenfull from "@/components/Screenfull";
|
|
import SizeSelect from "@/components/SizeSelect";
|
|
// import LangSelect from '@/components/LangSelect'
|
|
// import ThemePicker from '@/components/ThemePicker'
|
|
import Search from "@/components/HeaderSearch";
|
|
import RightMenu from "./rightMenu/rightMenu";
|
|
|
|
export default {
|
|
components: {
|
|
Breadcrumb,
|
|
Hamburger,
|
|
Screenfull,
|
|
SizeSelect,
|
|
// LangSelect,
|
|
// ThemePicker,
|
|
Search,
|
|
RightMenu
|
|
},
|
|
computed: {
|
|
...mapGetters(["sidebar"])
|
|
},
|
|
methods: {
|
|
toggleSideBar() {
|
|
this.$store.dispatch("toggleSideBar");
|
|
},
|
|
logout() {
|
|
this.$store.dispatch("LogOut").then(() => {
|
|
location.reload(); // In order to re-instantiate the vue-router object to avoid bugs
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
.navbar {
|
|
height: 50px;
|
|
overflow: hidden;
|
|
.hamburger-container {
|
|
line-height: 46px;
|
|
height: 100%;
|
|
float: left;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
&:hover {
|
|
background: rgba(0, 0, 0, 0.025);
|
|
}
|
|
}
|
|
.breadcrumb-container {
|
|
float: left;
|
|
}
|
|
.errLog-container {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
.right-menu {
|
|
float: right;
|
|
height: 100%;
|
|
line-height: 50px;
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
.right-menu-item {
|
|
display: inline-block;
|
|
padding: 0 8px;
|
|
height: 100%;
|
|
font-size: 18px;
|
|
color: #5a5e66;
|
|
vertical-align: text-bottom;
|
|
|
|
&.hover-effect {
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
&:hover {
|
|
background: rgba(0, 0, 0, 0.025);
|
|
}
|
|
}
|
|
}
|
|
/* 头像 */
|
|
.avatarWrapper {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: #eee;
|
|
img {
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
}
|
|
.avatar-container {
|
|
margin-right: 30px;
|
|
.avatar-wrapper {
|
|
margin-top: 5px;
|
|
position: relative;
|
|
.user-avatar {
|
|
cursor: pointer;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 10px;
|
|
}
|
|
.el-icon-caret-bottom {
|
|
cursor: pointer;
|
|
position: absolute;
|
|
right: -20px;
|
|
top: 25px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|