mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
fix: drawer、dialog 不显示 errorMessage 问题; drawer错误信息错位问题 (#5242)
Co-authored-by: tooeast <liuzedong02@baidu.com>
This commit is contained in:
parent
eb28d2fba7
commit
33a910140a
@ -289,9 +289,7 @@
|
||||
.#{$ns}Drawer-info {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
order: 10;
|
||||
align-self: center;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-error {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user