[new feature] Dialog: beforeClose add callback parameters (#1166)

This commit is contained in:
akebe 2018-05-26 22:36:35 +08:00 committed by neverland
parent e5978a1ab9
commit ea76777ec7

View File

@ -80,8 +80,10 @@ export default create({
handleAction(action) { handleAction(action) {
if (this.beforeClose) { if (this.beforeClose) {
this.loading[action] = true; this.loading[action] = true;
this.beforeClose(action, () => { this.beforeClose(action, state => {
this.onClose(action); if (state !== false) {
this.onClose(action);
}
this.loading[action] = false; this.loading[action] = false;
}); });
} else { } else {