Improve code modal style.

This commit is contained in:
Yang Luo
2021-06-27 01:34:25 +08:00
parent a42a76400e
commit fbfae75780
3 changed files with 13 additions and 1 deletions

View File

@ -52,6 +52,7 @@ export const CountDownInput = (props) => {
const handleOk = () => {
setVisible(false);
onButtonClick(checkType, checkId, key, ...onButtonClickArgs).then(res => {
setKey("");
if (res) {
setCoolDown(true);
countDown(coolDownTime);
@ -61,6 +62,7 @@ export const CountDownInput = (props) => {
const handleCancel = () => {
setVisible(false);
setKey("");
}
const loadHumanCheck = () => {
@ -93,7 +95,7 @@ export const CountDownInput = (props) => {
}}
/>
<Row>
<Input placeholder={i18next.t("general:Enter the code")} onChange={e => setKey(e.target.value)} />
<Input value={key} placeholder={i18next.t("general:Captcha")} onPressEnter={handleOk} onChange={e => setKey(e.target.value)} />
</Row>
</Col>
)
@ -131,9 +133,15 @@ export const CountDownInput = (props) => {
onSearch={clickButton}
/>
<Modal
closable={false}
maskClosable={false}
title={i18next.t("general:Captcha")}
visible={visible}
okText={i18next.t("user:OK")}
cancelText={i18next.t("user:Cancel")}
onCancel={handleCancel}
onOk={handleOk}
width={300}
>
{renderCheck()}
</Modal>

View File

@ -39,6 +39,7 @@
"Swagger": "Swagger",
"Phone Prefix": "Phone Prefix",
"Enter the code": "Enter the code",
"Captcha": "Captcha",
"Authorization code":"Authorization code",
"Access token":"Access token",
"Expires in":"Expires in",
@ -168,6 +169,7 @@
"New password contains blank space.": "New password contains blank space.",
"Invalid new password": "Invalid new password",
"Password": "Password",
"OK": "OK",
"Cancel": "Cancel",
"input password": "input password",
"Reset Email...": "Reset Email...",

View File

@ -39,6 +39,7 @@
"Swagger": "API总览",
"Phone Prefix": "手机号前缀",
"Enter the code": "输入验证码",
"Captcha": "人机验证码",
"Authorization code": "授权码",
"Access token": "访问令牌",
"Expires in": "有效期",
@ -168,6 +169,7 @@
"New password contains blank space.": "新密码包含空格。",
"Invalid new password": "非法的新密码。",
"Password": "密码",
"OK": "确定",
"Cancel": "取消",
"input password": "输入密码",
"Reset Email...": "重置邮箱...",