正在显示
3 个修改的文件
包含
8 行增加
和
1 行删除
| @@ -101,6 +101,10 @@ export default { | @@ -101,6 +101,10 @@ export default { | ||
| 101 | width: calc(100% - 54px); | 101 | width: calc(100% - 54px); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | + .sidebarHide .fixed-header { | ||
| 105 | + width: calc(100%); | ||
| 106 | + } | ||
| 107 | + | ||
| 104 | .mobile .fixed-header { | 108 | .mobile .fixed-header { |
| 105 | width: 100%; | 109 | width: 100%; |
| 106 | } | 110 | } |
| @@ -12,6 +12,9 @@ const state = { | @@ -12,6 +12,9 @@ const state = { | ||
| 12 | 12 | ||
| 13 | const mutations = { | 13 | const mutations = { |
| 14 | TOGGLE_SIDEBAR: state => { | 14 | TOGGLE_SIDEBAR: state => { |
| 15 | + if (state.sidebar.hide) { | ||
| 16 | + return false; | ||
| 17 | + } | ||
| 15 | state.sidebar.opened = !state.sidebar.opened | 18 | state.sidebar.opened = !state.sidebar.opened |
| 16 | state.sidebar.withoutAnimation = false | 19 | state.sidebar.withoutAnimation = false |
| 17 | if (state.sidebar.opened) { | 20 | if (state.sidebar.opened) { |
| @@ -51,7 +51,7 @@ const user = { | @@ -51,7 +51,7 @@ const user = { | ||
| 51 | return new Promise((resolve, reject) => { | 51 | return new Promise((resolve, reject) => { |
| 52 | getInfo().then(res => { | 52 | getInfo().then(res => { |
| 53 | const user = res.user | 53 | const user = res.user |
| 54 | - const avatar = ( user.avatar == "" || user.avatar == null ) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; | 54 | + const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; |
| 55 | if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 | 55 | if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 |
| 56 | commit('SET_ROLES', res.roles) | 56 | commit('SET_ROLES', res.roles) |
| 57 | commit('SET_PERMISSIONS', res.permissions) | 57 | commit('SET_PERMISSIONS', res.permissions) |
-
请 注册 或 登录 后发表评论