Browse Source

修改 菜单显示问题

杨宽 3 years ago
parent
commit
dcf10e0df9
1 changed files with 7 additions and 5 deletions
  1. 7 5
      src/views/layout/Menu.vue

+ 7 - 5
src/views/layout/Menu.vue

@@ -936,12 +936,14 @@ export default {
       handler: function (val, oldVal) {
         this.menuData.some((element, index) => {
           if (val.path.includes(element.id)) {
-            this.currRoot = element.id;
             this.$nextTick(() => {
-              this.currentMenu.some((element, index) => {
-                if (val.path == element.path) {
-                  this.activeIndex = index;
-                }
+              this.currRoot = element.id;
+              this.$nextTick(() => {
+                this.currentMenu.some((element, index) => {
+                  if (val.path == element.path) {
+                    this.activeIndex = index;
+                  }
+                });
               });
             });
             return true;