mirror of https://github.com/ElemeFE/element
Dialog: fix visible.sync compatibility with before-close
parent
b269c22bba
commit
3a19bdd191
|
@ -117,11 +117,15 @@
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
if (typeof this.beforeClose === 'function') {
|
if (typeof this.beforeClose === 'function') {
|
||||||
this.beforeClose(this.close);
|
this.beforeClose(this.hide);
|
||||||
} else {
|
} else {
|
||||||
this.close();
|
this.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
hide() {
|
||||||
|
this.$emit('update:visible', false);
|
||||||
|
this.$emit('visible-change', false);
|
||||||
|
},
|
||||||
updatePopper() {
|
updatePopper() {
|
||||||
this.broadcast('ElSelectDropdown', 'updatePopper');
|
this.broadcast('ElSelectDropdown', 'updatePopper');
|
||||||
this.broadcast('ElDropdownMenu', 'updatePopper');
|
this.broadcast('ElDropdownMenu', 'updatePopper');
|
||||||
|
|
Loading…
Reference in New Issue