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 unsuspend: Unsuspend
close: Close close: Close
reopen: Reopen reopen: Reopen
ok: OK
search: search:
title: Search Results title: Search Results
keywords: Keywords keywords: Keywords

View File

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

View File

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