morphone1995 4 年之前
父节点
当前提交
228f11411c
共有 1 个文件被更改,包括 11 次插入9 次删除
  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) {