From 714a9f0192948791e87f3578b45cd6ca9e501ed7 Mon Sep 17 00:00:00 2001 From: Anatoly Kolesov Date: Thu, 25 Jan 2018 05:30:15 +0300 Subject: [PATCH] Menu: disabled menu shouldn't dispatch click event (#9442) --- packages/menu/src/menu-item.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/menu/src/menu-item.vue b/packages/menu/src/menu-item.vue index d95101531..4eeaa726d 100644 --- a/packages/menu/src/menu-item.vue +++ b/packages/menu/src/menu-item.vue @@ -100,8 +100,10 @@ this.$el.style.backgroundColor = this.backgroundColor; }, handleClick() { - this.dispatch('ElMenu', 'item-click', this); - this.$emit('click', this); + if (!this.disabled) { + this.dispatch('ElMenu', 'item-click', this); + this.$emit('click', this); + }; } }, created() {