add stopPropagation for dropdown
This commit is contained in:
parent
f0de3cc7a9
commit
c7f705d071
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue