feat: Add SendSms component for sending SMS verification code
All checks were successful
CI / cache-and-install (push) Successful in 2m18s
All checks were successful
CI / cache-and-install (push) Successful in 2m18s
This commit is contained in:
12
src/components/send-sms.vue
Normal file
12
src/components/send-sms.vue
Normal 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>
|
Reference in New Issue
Block a user