注册、找回密码自动聚焦到第一个输入框,找回密码偶现获取验证码按钮无效

This commit is contained in:
谢思 2023-07-18 14:22:35 +08:00
parent 2bd6ebe7c2
commit 6a3c5c8291
2 changed files with 2 additions and 18 deletions

View File

@ -26,10 +26,6 @@ function Register(props){
const [setting, setSetting] = useState(undefined);
const seconds = useRef();
let interval = undefined;
//
// const inputEl = useRef(null);
useEffect(()=>{
//
@ -220,11 +216,6 @@ function Register(props){
}
}
useEffect(() => {
// inputEl.current.focus();
// clear;
}, [])
function changeRegisterType(type){
setGetCaptchaBut(false);
setRegisterType(type);
@ -277,8 +268,7 @@ function Register(props){
],
validateTrigger:"onBlur",
validateFirst: true,
// ref={inputEl}
})(<Input placeholder="请输入4-15位用户名以字母开头只能使用字母和数字" autoComplete="off"/>)}
})(<Input autoFocus placeholder="请输入4-15位用户名以字母开头只能使用字母和数字" autoComplete="off"/>)}
</Form.Item>
<Form.Item>
{getFieldDecorator('email',{

View File

@ -18,8 +18,6 @@ function ResetPassword(props) {
const [emailGo, setEmailGo] = useState(true);
const seconds = useRef();
let interval = undefined;
//
const inputEl = useRef(null);
//
useEffect(()=>{
@ -187,10 +185,6 @@ function ResetPassword(props) {
}
}
useEffect(() => {
inputEl.current.focus();
}, [])
return (
<div>
<div className="right_cont ResetPassword_content">
@ -213,7 +207,7 @@ function ResetPassword(props) {
],
validateTrigger: "onBlur",
validateFirst: true,
})(<Input ref={inputEl} className="account" placeholder="请输入已注册的手机号/邮箱" autoComplete="off"/>)}
})(<Input autoFocus className="account" placeholder="请输入已注册的手机号/邮箱"/>)}
</Form.Item>
<Form.Item>