[bugfix] Dialog: beforeClose not work for click overlay (#2707)

This commit is contained in:
neverland
2019-02-09 10:26:05 +08:00
committed by GitHub
parent 683e6d5183
commit e64b908a32
3 changed files with 31 additions and 6 deletions
+8 -1
View File
@@ -63,7 +63,14 @@ export default {
if (context.top) {
const { vm } = context.top;
vm.$emit('click-overlay');
vm.closeOnClickOverlay && vm.$emit('input', false);
if (vm.closeOnClickOverlay) {
if (vm.onClickOverlay) {
vm.onClickOverlay();
} else {
vm.close();
}
}
}
}
};