Dialog: fix visible.sync compatibility with before-close

pull/4670/head
Leopoldthecoder 2017-05-04 20:15:32 +08:00 committed by 杨奕
parent b269c22bba
commit 3a19bdd191
1 changed files with 6 additions and 2 deletions

View File

@ -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');