feat: Add SendSms component for sending SMS verification code
All checks were successful
CI / cache-and-install (push) Successful in 2m18s

This commit is contained in:
严浩
2024-09-03 16:44:10 +08:00
parent 4eb712c1d1
commit d9d9a87860
4 changed files with 423 additions and 409 deletions

View File

@ -0,0 +1,12 @@
<template>
<van-button type="primary" @click="triggerCountdown" :disabled="isCounting">
发送验证码
{{ !isCounting ? '' : `(${countdownTime}s)` }}
</van-button>
</template>
<script setup lang="ts">
import { useCountdown } from 'utils4u/vue-use';
const { countdownTime, triggerCountdown, isCounting } = useCountdown(3);
</script>