From c7f705d07195c1b315a14d46b11d382af19505b9 Mon Sep 17 00:00:00 2001 From: troy351 <914053923@qq.com> Date: Fri, 22 Mar 2019 17:59:01 +0800 Subject: [PATCH] add stopPropagation for dropdown --- src/components/dropdown/dropdown.vue | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/src/components/dropdown/dropdown.vue b/src/components/dropdown/dropdown.vue index feed5cc..138f560 100644 --- a/src/components/dropdown/dropdown.vue +++ b/src/components/dropdown/dropdown.vue @@ -57,6 +57,10 @@ transferClassName: { type: String }, + stopPropagation: { + type: Boolean, + default: false + }, }, computed: { transition () { @@ -164,6 +168,7 @@ }, mounted () { this.$on('on-click', (key) => { + if (this.stopPropagation) return; const $parent = this.hasParent(); if ($parent) $parent.$emit('on-click', key); }); -- libgit2 0.21.4