Skip to content

Commit 7199da9

Browse files
jikkaiLeopoldthecoder
authored andcommitted
Menu: fix open method error when collapse is changed (#11646)
1 parent 475f7cf commit 7199da9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/menu/src/submenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@
229229
}
230230
},
231231
created() {
232-
this.parentMenu.addSubmenu(this);
233-
this.rootMenu.addSubmenu(this);
234232
this.$on('toggle-collapse', this.handleCollapseToggle);
235233
this.$on('mouse-enter-child', () => {
236234
this.mouseInChild = true;
@@ -242,6 +240,8 @@
242240
});
243241
},
244242
mounted() {
243+
this.parentMenu.addSubmenu(this);
244+
this.rootMenu.addSubmenu(this);
245245
this.initPopper();
246246
},
247247
beforeDestroy() {

0 commit comments

Comments
 (0)