fix: default http code 400 confirm btn text change to ok (#570)

This commit is contained in:
dashuai 2023-10-17 15:36:45 +08:00 committed by GitHub
parent 86ed0ce383
commit 727a973857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -1132,6 +1132,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);
}