From 7e0978c76438ae5a31fc97252e9db1f168bc7c92 Mon Sep 17 00:00:00 2001 From: "Mr. Xie" <117615674+PdxLook@users.noreply.github.com> Date: Tue, 10 Mar 2026 05:10:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E7=99=BB=E5=BD=95=E5=8F=91=E9=80=81=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E6=A0=A1=E9=AA=8C=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E6=88=96=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5=E4=BB=8D=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E5=80=92=E8=AE=A1=E6=97=B6=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#7616)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-ele/src/views/_core/authentication/code-login.vue | 4 ++++ .../@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web-ele/src/views/_core/authentication/code-login.vue b/apps/web-ele/src/views/_core/authentication/code-login.vue index acfd1fd78..44b46b2ba 100644 --- a/apps/web-ele/src/views/_core/authentication/code-login.vue +++ b/apps/web-ele/src/views/_core/authentication/code-login.vue @@ -40,6 +40,10 @@ const formSchema = computed((): VbenFormSchema[] => { return text; }, placeholder: $t('authentication.code'), + handleSendCode: async () => { + console.warn('发送验证码前校验等逻辑'); + throw new Error('手机号校验失败'); + }, }, fieldName: 'code', label: $t('authentication.code'), diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue b/packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue index a419bfc0d..a7dc21cd7 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue @@ -59,9 +59,9 @@ function handleComplete(e: string[]) { async function handleSend(e: Event) { try { e?.preventDefault(); + await handleSendCode(); countdown.value = maxTime; startCountdown(); - await handleSendCode(); } catch (error) { console.error('Failed to send code:', error); // Consider emitting an error event or showing a notification