Browse Source

子菜单组件BUG修复

DESKTOP-6LTVLN7\Liumouren 2 years ago
parent
commit
afc5ab53fe
2 changed files with 6 additions and 2 deletions
  1. 1 1
      src/components/layout/MenuCard.vue
  2. 5 1
      src/main.js

+ 1 - 1
src/components/layout/MenuCard.vue

@@ -4,7 +4,7 @@
     :class="$ifLeftMenu(menuData.index) ? 'menuMainBoxA' : 'menuMainBox'"
     :style="{
       width: menuData.boxWidth ? menuData.boxWidth + 'px' : '410px',
-      height: menuData.boxHeight + 'px',
+      height: menuData.boxHeight ? menuData.boxHeight + 'px' : 'auto',
       border: menuData.type !== 'chart' ? '' : '1px solid #2FB8FF',
       background: menuData.boxBackground ? menuData.boxBackground : ''
     }"

+ 5 - 1
src/main.js

@@ -19,7 +19,11 @@ Vue.prototype.$ifMenu = (menuIndex, subMenuIndex) => {
   }
 };
 Vue.prototype.$ifLeftMenu = (leftMenuIndex) => {
-  return store.state.leftMenuIndex == leftMenuIndex;
+  if (leftMenuIndex) {
+    return store.state.leftMenuIndex == leftMenuIndex;
+  } else {
+    return false;
+  }
 }
 new Vue({
   router,