Browse Source

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

YunaiV 2 years ago
parent
commit
d6ef0ccd60
2 changed files with 7 additions and 0 deletions
  1. 4 0
      yudao-ui-admin/src/layout/index.vue
  2. 3 0
      yudao-ui-admin/src/store/modules/app.js

+ 4 - 0
yudao-ui-admin/src/layout/index.vue

@@ -101,6 +101,10 @@ export default {
   width: calc(100% - 54px);
 }
 
+.sidebarHide .fixed-header {
+  width: calc(100%);
+}
+
 .mobile .fixed-header {
   width: 100%;
 }

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

@@ -12,6 +12,9 @@ const state = {
 
 const mutations = {
   TOGGLE_SIDEBAR: state => {
+    if (state.sidebar.hide) {
+      return false;
+    }
     state.sidebar.opened = !state.sidebar.opened
     state.sidebar.withoutAnimation = false
     if (state.sidebar.opened) {