fix: default http code 400 confirm btn text change to ok

This commit is contained in:
shuai 2023-10-17 15:35:13 +08:00
parent 1dda6c6bf5
commit 1913a4f30b
3 changed files with 6 additions and 1 deletions

View File

@ -1128,6 +1128,7 @@ ui:
unsuspend: Unsuspend
close: Close
reopen: Reopen
ok: OK
search:
title: Search Results
keywords: Keywords

View File

@ -71,7 +71,9 @@ const Index: FC<Props> = ({
}}
id="ok_button"
disabled={confirmBtnDisabled}>
{confirmText || t('btns.confirm')}
{confirmText === 'OK'
? t('btns.ok')
: confirmText || t('btns.confirm')}
</Button>
)}
</Modal.Footer>

View File

@ -117,6 +117,8 @@ class Request {
// default error msg will show modal
Modal.confirm({
content: msg,
showCancel: false,
confirmText: 'OK',
});
return Promise.reject(false);
}