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>
|
@ -54,6 +54,10 @@ const FComponent: FunctionalComponent<{ prop: string }> = (props, context) => (
|
||||
<h2>Fonts are downloaded directly from Google Fonts</h2>
|
||||
<p>{{ JSON.stringify({ $style }) }}</p>
|
||||
</div>
|
||||
|
||||
<div b="1px solid pink" mt-8 p-8>
|
||||
<SendSms />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style module>
|
||||
|
Reference in New Issue
Block a user