fix(person): 优化验证码输入错误处理逻辑设置焦点到第一个输入框
This commit is contained in:
@ -67,8 +67,8 @@ const onSubmit = () => {
|
|||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
emits('success', captcha);
|
emits('success', captcha);
|
||||||
} else {
|
} else {
|
||||||
|
inputRef.value?.[activeIndex.value]?.blur?.();
|
||||||
activeIndex.value = 0;
|
activeIndex.value = 0;
|
||||||
inputRef.value?.[activeIndex.value]?.focus?.();
|
|
||||||
errorMessage.value = '验证码错误,请检查后重试';
|
errorMessage.value = '验证码错误,请检查后重试';
|
||||||
isError.value = true;
|
isError.value = true;
|
||||||
codeArray.value.forEach((item) => {
|
codeArray.value.forEach((item) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user