|
@@ -1,5 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div :class="classObj" class="app-wrapper">
|
|
<div :class="classObj" class="app-wrapper">
|
|
|
|
+ <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
|
<div
|
|
<div
|
|
v-if="device === 'mobile' && sidebar.opened"
|
|
v-if="device === 'mobile' && sidebar.opened"
|
|
class="drawer-bg"
|
|
class="drawer-bg"
|
|
@@ -20,6 +21,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { Navbar, Sidebar, AppMain, FootMark } from './components'
|
|
import { Navbar, Sidebar, AppMain, FootMark } from './components'
|
|
|
|
+import Hamburger from '@/components/Hamburger'
|
|
// import ResizeMixin from './mixin/ResizeHandler'
|
|
// import ResizeMixin from './mixin/ResizeHandler'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -28,7 +30,8 @@ export default {
|
|
Navbar,
|
|
Navbar,
|
|
Sidebar,
|
|
Sidebar,
|
|
AppMain,
|
|
AppMain,
|
|
- FootMark
|
|
|
|
|
|
+ FootMark,
|
|
|
|
+ Hamburger
|
|
},
|
|
},
|
|
// mixins: [ResizeMixin],
|
|
// mixins: [ResizeMixin],
|
|
computed: {
|
|
computed: {
|
|
@@ -62,6 +65,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ toggleSideBar() {
|
|
|
|
+ this.$store.dispatch('app/toggleSideBar')
|
|
|
|
+ },
|
|
handleClickOutside() {
|
|
handleClickOutside() {
|
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
|
}
|
|
}
|
|
@@ -82,6 +88,21 @@ export default {
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 0;
|
|
top: 0;
|
|
}
|
|
}
|
|
|
|
+ .hamburger-container {
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ line-height: 46px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ transition: background .3s;
|
|
|
|
+ -webkit-tap-highlight-color:transparent;
|
|
|
|
+ z-index: 9;
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ background: rgba(0, 0, 0, .025)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.drawer-bg {
|
|
.drawer-bg {
|
|
background: #000;
|
|
background: #000;
|