Commit c7f705d07195c1b315a14d46b11d382af19505b9
Committed by
GitHub
1 parent
f0de3cc7
add stopPropagation for dropdown
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
src/components/dropdown/dropdown.vue
... | ... | @@ -57,6 +57,10 @@ |
57 | 57 | transferClassName: { |
58 | 58 | type: String |
59 | 59 | }, |
60 | + stopPropagation: { | |
61 | + type: Boolean, | |
62 | + default: false | |
63 | + }, | |
60 | 64 | }, |
61 | 65 | computed: { |
62 | 66 | transition () { |
... | ... | @@ -164,6 +168,7 @@ |
164 | 168 | }, |
165 | 169 | mounted () { |
166 | 170 | this.$on('on-click', (key) => { |
171 | + if (this.stopPropagation) return; | |
167 | 172 | const $parent = this.hasParent(); |
168 | 173 | if ($parent) $parent.$emit('on-click', key); |
169 | 174 | }); | ... | ... |