fix: reset slider-captcha after login failed (#6275)

pull/115/head
Netfan 2025-05-25 16:04:56 +08:00 committed by GitHub
parent e5c937396d
commit 6fbf1387f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -111,10 +111,11 @@ const loginRef =
async function onSubmit(params: Recordable<any>) {
authStore.authLogin(params).catch(() => {
//
const formApi = loginRef.value?.getFormApi();
//
formApi?.setFieldValue('captcha', false, false);
// 使APIresume
loginRef.value
?.getFormApi()
formApi
?.getFieldComponentRef<InstanceType<typeof SliderCaptcha>>('captcha')
?.resume();
});