Merge pull request #561 from RickCole21/master

修复弹框中feedback,confirm关闭弹框逻辑
This commit is contained in:
liaoxuezhi 2020-04-22 13:55:51 +08:00 committed by GitHub
commit 3d4a058fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -644,10 +644,13 @@ export default class Form extends React.Component<FormProps, object> {
// submit 也支持 feedback
if (action.feedback && isVisible(action.feedback, store.data)) {
await this.openFeedback(action.feedback, store.data);
const confirmed = await this.openFeedback(
action.feedback,
store.data
);
// 如果 feedback 配置了,取消就跳过原有逻辑。
if (action.feedback.skipRestOnCancel) {
if (action.feedback.skipRestOnCancel && !confirmed) {
throw new SkipOperation();
}
}