Files
heroui-vue/apps/docs/demos/input-otp-disabled.vue
T

40 lines
973 B
Vue

<script setup lang="ts">
import {
Description,
InputOTP,
InputOTPGroup,
InputOTPSeparator,
InputOTPSlot,
Label,
} from "@heroui-vue/components";
import { useId } from "vue";
const otpDescriptionId = useId();
const otpLabelId = useId();
</script>
<template>
<div class="flex w-[280px] flex-col gap-2">
<Label :id="otpLabelId" is-disabled>验证账户</Label>
<Description :id="otpDescriptionId">验证码校验当前已禁用</Description>
<InputOTP
:aria-describedby="otpDescriptionId"
:aria-labelledby="otpLabelId"
is-disabled
: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>
</template>