Skip to content

Commit 0a29ce9

Browse files
committed
Menu: fix open method error when collapse is changed
1 parent 48c7bcc commit 0a29ce9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/menu/src/submenu.vue

+2-2
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)