hmp há 4 anos atrás
pai
commit
1af07c2da2
2 ficheiros alterados com 5 adições e 2 exclusões
  1. 1 1
      src/page/index/index.vue
  2. 4 1
      src/store/modules/common.js

+ 1 - 1
src/page/index/index.vue

@@ -7,7 +7,7 @@
 
     <div class="avue-layout" style="background-color: #042352;">
       <!-- 左侧导航栏 -->
-      <div class="animate__animated avue-left animate__faster"
+      <div v-show="menuIndex != 0" class="animate__animated avue-left animate__faster"
         :class="menuIndex == 0 ? 'animate__bounceOutLeft' : 'animate__bounceInLeft'">
         <sidebar />
       </div>

+ 4 - 1
src/store/modules/common.js

@@ -6,12 +6,12 @@ import {
 import website from '@/config/website'
 
 const common = {
-
   state: {
     language: getStore({name: 'language'}) || 'zh',
     isCollapse: false,
     isFullScren: false,
     isMenu: true,
+    menuIndex:0,
     isShade: false,
     screen: -1,
     isLock: getStore({name: 'isLock'}) || false,
@@ -49,6 +49,9 @@ const common = {
     SET_IS_MENU: (state, menu) => {
       state.isMenu = menu;
     },
+    SET_MENU_INDEX:(state,index)=>{
+      state.menuIndex=index
+    },
     SET_LOCK: (state) => {
       state.isLock = true;
       setStore({