Browse Source

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

pull/6710/head
谦元吉 5 months ago
committed by GitHub
parent
commit
c57592f3a6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue

2
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

Loading…
Cancel
Save