Explorar o código

优化固定Header后顶部导航栏样式问题(I4XDN5)

RuoYi %!s(int64=4) %!d(string=hai) anos
pai
achega
dc8938ab2f
Modificáronse 2 ficheiros con 7 adicións e 0 borrados
  1. 4 0
      ruoyi-ui/src/layout/index.vue
  2. 3 0
      ruoyi-ui/src/store/modules/app.js

+ 4 - 0
ruoyi-ui/src/layout/index.vue

@@ -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
   }

+ 3 - 0
ruoyi-ui/src/store/modules/app.js

@@ -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) {