Commit 7199da98 authored by Jikkai Xiao's avatar Jikkai Xiao Committed by 杨奕

Menu: fix open method error when collapse is changed (#11646)

parent 475f7cf0
...@@ -229,8 +229,6 @@ ...@@ -229,8 +229,6 @@
} }
}, },
created() { created() {
this.parentMenu.addSubmenu(this);
this.rootMenu.addSubmenu(this);
this.$on('toggle-collapse', this.handleCollapseToggle); this.$on('toggle-collapse', this.handleCollapseToggle);
this.$on('mouse-enter-child', () => { this.$on('mouse-enter-child', () => {
this.mouseInChild = true; this.mouseInChild = true;
...@@ -242,6 +240,8 @@ ...@@ -242,6 +240,8 @@
}); });
}, },
mounted() { mounted() {
this.parentMenu.addSubmenu(this);
this.rootMenu.addSubmenu(this);
this.initPopper(); this.initPopper();
}, },
beforeDestroy() { beforeDestroy() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment