Browse Source

Menu: fixed submenu hidden bug after adding popper-append-to-body (#15391)

花裤衩 6 years ago
parent
commit
69715b6154
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/menu/src/submenu.vue

+ 3 - 0
packages/menu/src/submenu.vue

@@ -208,6 +208,9 @@
         this.dispatch('ElSubmenu', 'mouse-leave-child');
         clearTimeout(this.timeout);
         this.timeout = setTimeout(() => {
+          if (this.appendToBody) {
+            this.rootMenu.openedMenus = [];
+          }
           !this.mouseInChild && this.rootMenu.closeMenu(this.index);
         }, this.hideTimeout);
       },