fix: submit button is incorrect in edit model
This commit is contained in:
@@ -356,6 +356,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
form.setFieldsValue(formData);
|
form.setFieldsValue(formData);
|
||||||
setWarningStatus({
|
setWarningStatus({
|
||||||
show: true,
|
show: true,
|
||||||
|
isDefault: true,
|
||||||
message: intl.formatMessage({
|
message: intl.formatMessage({
|
||||||
id: 'models.form.update.tips'
|
id: 'models.form.update.tips'
|
||||||
})
|
})
|
||||||
@@ -404,10 +405,15 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
<ModalFooter
|
<ModalFooter
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
onOk={handleSumit}
|
onOk={handleSumit}
|
||||||
showOkBtn={!warningStatus.show || warningStatus.type === 'success'}
|
showOkBtn={
|
||||||
|
!warningStatus.show ||
|
||||||
|
warningStatus.type === 'success' ||
|
||||||
|
warningStatus.isDefault
|
||||||
|
}
|
||||||
extra={
|
extra={
|
||||||
warningStatus.show &&
|
warningStatus.show &&
|
||||||
warningStatus.type !== 'success' && (
|
warningStatus.type !== 'success' &&
|
||||||
|
!warningStatus.isDefault && (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={handleSubmitAnyway}
|
onClick={handleSubmitAnyway}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ type MessageStatus = {
|
|||||||
title?: string;
|
title?: string;
|
||||||
type?: Global.MessageType;
|
type?: Global.MessageType;
|
||||||
isHtml?: boolean;
|
isHtml?: boolean;
|
||||||
|
isDefault?: boolean;
|
||||||
message: string | string[];
|
message: string | string[];
|
||||||
evaluateResult?: EvaluateResult;
|
evaluateResult?: EvaluateResult;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user