研发图纸文件管理系统-前端项目
longyvfengyun
2022-09-02 1dc7bfae97ac86753322d14c505acee167da66d3
左侧导航默认收缩,顶部栏默认不显示
5个文件已修改
22 ■■■■■ 已修改文件
src/config/default/setting.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/AdminLayout.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/tabs/TabsHead.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/WorkPlace.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/setting.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/default/setting.config.js
@@ -11,7 +11,7 @@
  layout: 'side',                       //导航布局,可选 side 和 head,分别为侧边导航和顶部导航
  fixedHeader: false,                   //固定头部状态栏,true:固定,false:不固定
  fixedSideBar: true,                   //固定侧边栏,true:固定,false:不固定
  fixedTabs: false,                      //固定页签头,true:固定,false:不固定
  fixedTabs: true,                      //固定页签头,true:固定,false:不固定
  pageWidth: 'fixed',                   //内容区域宽度,fixed:固定宽度,fluid:流式宽度
  weekMode: false,                      //色弱模式,true:开启,false:不开启
  multiPage: false,                     //多页签模式,true:开启,false:不开启
src/layouts/AdminLayout.vue
@@ -42,7 +42,7 @@
  data () {
    return {
      minHeight: window.innerHeight - 64 - 122,
      collapsed: false,
      collapsed: true,
      showSetting: false,
      drawerOpen: false
    }
@@ -63,12 +63,15 @@
      if(!val) {
        this.drawerOpen = false
      }
    },
    affixed() {
      this.resize();
    }
  },
  computed: {
    ...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader', 'fixedSideBar',
      'fixedTabs', 'hideSetting', 'multiPage']),
    ...mapGetters('setting', ['firstMenu', 'subMenu', 'menuData']),
    ...mapGetters('setting', ['firstMenu', 'subMenu', 'menuData', 'affixed']),
    sideMenuWidth() {
      return this.collapsed ? '80px' : '256px'
    },
@@ -108,7 +111,11 @@
      }
    },
    resize() {
      this.minHeight = window.innerHeight - 64 - 122;
      if(this.affixed) {
        this.minHeight = window.innerHeight - 122;
      }else {
        this.minHeight = window.innerHeight - 64 - 122;
      }
      this.setMinHeight(this.minHeight);
    }
  },
src/layouts/tabs/TabsHead.vue
@@ -55,7 +55,7 @@
    },
    data() {
      return {
        affixed: false,
        affixed: true,
      }
    },
    inject:['adminLayout'],
src/pages/workplace/WorkPlace.vue
@@ -60,9 +60,6 @@
        const bar = document.querySelectorAll(".header-bar")[0].clientHeight;
        const workPlaceTop = document.querySelectorAll(".work-place-top")[0].clientHeight;
        this.y = this.minHeight-bar-workPlaceTop-56;
        if(this.affixed) {
          this.y = this.y+60;
        }
      }
    },
    affixed() {
src/store/modules/setting.js
@@ -21,7 +21,7 @@
    customTitles,
    ...config,
    ...localSetting,
    affixed: false,
    affixed: true,
    minHeight: window.innerHeight - 64 - 122,
  },
  getters: {