瀏覽代碼

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

RuoYi 3 年之前
父節點
當前提交
a5153cea4c
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 4 0
      src/layout/index.vue
  2. 3 0
      src/store/modules/app.js

+ 4 - 0
src/layout/index.vue

@@ -98,6 +98,10 @@ function setLayout() {
   width: calc(100% - 54px);
 }
 
+.sidebarHide .fixed-header {
+  width: calc(100%);
+}
+
 .mobile .fixed-header {
   width: 100%;
 }

+ 3 - 0
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) {