Popover: not emit event or create popper when disabled (#11426)

pull/11453/head
hetech 2018-05-31 12:15:11 +08:00 committed by 杨奕
parent dc816832e1
commit 1b7a032e97
2 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,9 @@ export default {
},
watch: {
showPopper(val) {
if (this.disabled) {
return;
}
val ? this.$emit('show') : this.$emit('hide');
}
},

View File

@ -70,6 +70,9 @@ export default {
},
showPopper(val) {
if (this.disabled) {
return;
}
val ? this.updatePopper() : this.destroyPopper();
this.$emit('input', val);
}