Set focus for code modal.

This commit is contained in:
Yang Luo
2021-06-27 01:49:52 +08:00
parent fbfae75780
commit 8343007afa

View File

@ -95,7 +95,7 @@ export const CountDownInput = (props) => {
}} }}
/> />
<Row> <Row>
<Input value={key} placeholder={i18next.t("general:Captcha")} onPressEnter={handleOk} onChange={e => setKey(e.target.value)} /> <Input autoFocus value={key} placeholder={i18next.t("general:Captcha")} onPressEnter={handleOk} onChange={e => setKey(e.target.value)} />
</Row> </Row>
</Col> </Col>
) )
@ -135,13 +135,14 @@ export const CountDownInput = (props) => {
<Modal <Modal
closable={false} closable={false}
maskClosable={false} maskClosable={false}
destroyOnClose={true}
title={i18next.t("general:Captcha")} title={i18next.t("general:Captcha")}
visible={visible} visible={visible}
okText={i18next.t("user:OK")} okText={i18next.t("user:OK")}
cancelText={i18next.t("user:Cancel")} cancelText={i18next.t("user:Cancel")}
onCancel={handleCancel} onCancel={handleCancel}
onOk={handleOk} onOk={handleOk}
width={300} width={248}
> >
{renderCheck()} {renderCheck()}
</Modal> </Modal>