Pārlūkot izejas kodu

fix(@vben-core/shadcn-ui): 修复VbenPinInput组件在点击获取验证码和回车同时进行时会重复触发计时器的问题 (#6705)

谦元吉 2 nedēļas atpakaļ
vecāks
revīzija
c57592f3a6

+ 1 - 1
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