优化 dialog ajax 的处理,出错不应该关闭弹窗

This commit is contained in:
2betop 2020-07-16 11:50:22 +08:00
parent 5636d51712
commit 50aa27dba7

View File

@ -761,7 +761,12 @@ export default class Form extends React.Component<FormProps, object> {
action.reload && this.reloadTarget(action.reload, store.data); action.reload && this.reloadTarget(action.reload, store.data);
action.close && this.closeTarget(action.close); action.close && this.closeTarget(action.close);
}) })
.catch(() => {}); .catch(e => {
onFailed && onFailed(e, store.errors);
if (throwErrors) {
throw e;
}
});
} else if (action.actionType === 'reload') { } else if (action.actionType === 'reload') {
store.setCurrentAction(action); store.setCurrentAction(action);
action.target && this.reloadTarget(action.target, data); action.target && this.reloadTarget(action.target, data);