fix: drawer、dialog 不显示 errorMessage 问题; drawer错误信息错位问题 (#5242)

Co-authored-by: tooeast <liuzedong02@baidu.com>
This commit is contained in:
sansiro 2022-08-26 13:39:48 +08:00 committed by GitHub
parent eb28d2fba7
commit 33a910140a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 30 deletions

View File

@ -289,9 +289,7 @@
.#{$ns}Drawer-info {
flex-basis: 0;
flex-grow: 1;
order: 10;
align-self: center;
text-align: right;
}
.#{$ns}Drawer-error {

View File

@ -741,20 +741,25 @@ export class DialogRenderer extends Dialog {
true
)
)
).then(values => {
if (
(action.type === 'submit' ||
action.actionType === 'submit' ||
action.actionType === 'confirm') &&
action.close !== false
) {
onConfirm && onConfirm(values, rawAction || action, ctx, targets);
} else if (action.close) {
action.close === true
? this.handleSelfClose()
: this.closeTarget(action.close);
}
});
)
.then(values => {
if (
(action.type === 'submit' ||
action.actionType === 'submit' ||
action.actionType === 'confirm') &&
action.close !== false
) {
onConfirm && onConfirm(values, rawAction || action, ctx, targets);
} else if (action.close) {
action.close === true
? this.handleSelfClose()
: this.closeTarget(action.close);
}
})
.catch(reason => {
store.updateMessage(reason.message, true);
throw reason;
});
return true;
}

View File

@ -745,20 +745,25 @@ export class DrawerRenderer extends Drawer {
true
)
)
).then(values => {
if (
(action.type === 'submit' ||
action.actionType === 'submit' ||
action.actionType === 'confirm') &&
action.close !== false
) {
onConfirm && onConfirm(values, rawAction || action, ctx, targets);
} else if (action.close) {
action.close === true
? this.handleSelfClose()
: this.closeTarget(action.close);
}
});
)
.then(values => {
if (
(action.type === 'submit' ||
action.actionType === 'submit' ||
action.actionType === 'confirm') &&
action.close !== false
) {
onConfirm && onConfirm(values, rawAction || action, ctx, targets);
} else if (action.close) {
action.close === true
? this.handleSelfClose()
: this.closeTarget(action.close);
}
})
.catch(reason => {
store.updateMessage(reason.message, true);
throw reason;
});
return true;
}