瀏覽代碼

修改 菜单显示问题

杨宽 3 年之前
父節點
當前提交
dcf10e0df9
共有 1 個文件被更改,包括 7 次插入5 次删除
  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;