From 434db3c909d7a0f2c1a4435552097e2866399961 Mon Sep 17 00:00:00 2001 From: "mo.duan" Date: Fri, 6 Sep 2019 15:21:55 +0800 Subject: [PATCH] =?UTF-8?q?Dropdown=20will=20not=20trigger=20@on-click=20e?= =?UTF-8?q?vent=20when=20set=20disabled=20prop=20to=20D=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dropdown/dropdown-item.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/dropdown/dropdown-item.vue b/src/components/dropdown/dropdown-item.vue index 3a98cd97..9cc7dc54 100644 --- a/src/components/dropdown/dropdown-item.vue +++ b/src/components/dropdown/dropdown-item.vue @@ -37,15 +37,10 @@ }, methods: { handleClick () { + if (this.disabled) return; const $parent = findComponentUpward(this, 'Dropdown'); const hasChildren = this.$parent && this.$parent.$options.name === 'Dropdown'; - - if (this.disabled) { - this.$nextTick(() => { - $parent.currentVisible = true; - }); - return; - } else if (hasChildren) { + if (hasChildren) { this.$parent.$emit('on-haschild-click'); } else { if ($parent && $parent.$options.name === 'Dropdown') {