Files

40 lines
1.1 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
InputOTP,
InputOTPGroup,
InputOTPSeparator,
InputOTPSlot,
Label,
Link,
} from "@heroui-vue/components";
import { useId } from "vue";
const otpLabelId = useId();
</script>
<template>
<div class="flex w-[280px] flex-col gap-2">
<div class="flex flex-col gap-1">
<Label :id="otpLabelId">验证账户</Label>
<p class="text-sm text-muted">我们已向 a****@gmail.com 发送验证码</p>
</div>
<InputOTP :aria-labelledby="otpLabelId" :max-length="6">
<InputOTPGroup>
<InputOTPSlot :index="0" />
<InputOTPSlot :index="1" />
<InputOTPSlot :index="2" />
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
<InputOTPSlot :index="3" />
<InputOTPSlot :index="4" />
<InputOTPSlot :index="5" />
</InputOTPGroup>
</InputOTP>
<div class="flex items-center gap-[5px] px-1 pt-1">
<p class="text-sm text-muted">没有收到验证码?</p>
<Link class="text-foreground underline" href="#">重新发送</Link>
</div>
</div>
</template>