morphone1995 il y a 4 ans
Parent
commit
228f11411c
1 fichiers modifiés avec 11 ajouts et 9 suppressions
  1. 11 9
      src/components/common/Menu.vue

+ 11 - 9
src/components/common/Menu.vue

@@ -44,16 +44,18 @@ export default {
   },
   created() {
     // console.log(this.$route,'this.$route');
-    // this.defaultActive = this.$route.fullPath;
-
-    let menupath = localStorage.getItem('menuPath');
     this.defaultActive = this.$route.fullPath;
-    if (this.$route.fullPath != menupath) {
-      this.defaultActive = menupath;
-      this.$router.push({ path: menupath });
-    } else {
-      this.defaultActive = this.$route.fullPath;
-    }
+
+    // let menupath = localStorage.getItem('menuPath');
+    // this.defaultActive = this.$route.fullPath;
+    // console.log(this.defaultActive,'defaultActive');
+    // console.log(menupath,'menupath');
+    // if (this.$route.fullPath != menupath) {
+    //   this.defaultActive = menupath;
+    //   this.$router.push({ path: menupath });
+    // } else {
+    //   this.defaultActive = this.$route.fullPath;
+    // }
   },
   methods: {
     handleSelect(key, keyPath) {