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

pull/11663/head
Jikkai Xiao 2018-06-15 17:39:45 +08:00 committed by 杨奕
parent 475f7cf01d
commit 7199da9836
1 changed files with 2 additions and 2 deletions

View File

@ -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 @@
}); });
}, },
mounted() { mounted() {
this.parentMenu.addSubmenu(this);
this.rootMenu.addSubmenu(this);
this.initPopper(); this.initPopper();
}, },
beforeDestroy() { beforeDestroy() {