-
-
+
@@ -44,7 +45,8 @@ import { validateNewPassword } from '@/utils/validate'
import { updateUserPwd, checkPasswordStatus } from '@/api/system/user'
import { handleNoWarningLog } from '@/api/system/log'
import {MessageBox} from "element-ui";
-
+import { mapGetters } from 'vuex'
+import Hamburger from '@/components/Hamburger'
export default {
name: 'Layout',
data() {
@@ -89,11 +91,15 @@ export default {
Navbar,
RightPanel,
Settings,
+ Hamburger,
Sidebar,
TagsView
},
mixins: [ResizeMixin],
computed: {
+ ...mapGetters([
+ 'sidebar'
+ ]),
...mapState({
theme: state => state.settings.theme,
sideTheme: state => state.settings.sideTheme,
@@ -123,6 +129,9 @@ export default {
this.handleNoWarningLog()
},
methods: {
+ toggleSideBar() {
+ this.$store.dispatch('app/toggleSideBar')
+ },
checkPasswordStatus() {
checkPasswordStatus().then(response => {
if (response.code === 200) {
@@ -311,4 +320,17 @@ export default {
.mobile .fixed-header {
width: 100%;
}
+
+.hamburger-container {
+ line-height: 46px;
+ height: 100%;
+ float: left;
+ cursor: pointer;
+ transition: background .3s;
+ -webkit-tap-highlight-color:transparent;
+
+ &:hover {
+ background: rgba(0, 0, 0, .025)
+ }
+ }
diff --git a/src/router/index.js b/src/router/index.js
index 757e5ec7..0e699369 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -64,15 +64,15 @@ export const constantRoutes = [
{
path: '',
component: Layout,
- redirect: 'index',
- children: [
- {
- path: 'index',
- component: () => import('@/views/index_v1'),
- name: 'Index',
- meta: { title: '首页', icon: 'dashboard', affix: true }
- }
- ]
+ redirect: '/canteen/index',
+ // children: [
+ // {
+ // path: 'index',
+ // component: () => import('@/views/index_v1'),
+ // name: 'Index',
+ // meta: { title: '首页', icon: 'dashboard', affix: true }
+ // }
+ // ]
},
{
path: '/user',
diff --git a/src/settings.js b/src/settings.js
index 6a0b09f4..53537c7d 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -12,7 +12,7 @@ module.exports = {
/**
* 是否显示顶部导航
*/
- topNav: false,
+ topNav: true,
/**
* 是否显示 tagsView
@@ -27,7 +27,7 @@ module.exports = {
/**
* 是否显示logo
*/
- sidebarLogo: true,
+ sidebarLogo: false,
/**
* 是否显示动态标题
+
+