Files
heroui-vue/apps/docs/demos/time-field-with-prefix-and-suffix.vue
T

29 lines
767 B
Vue

<script setup lang="ts">
import {
TimeField,
TimeFieldGroup,
TimeFieldInput,
TimeFieldSegment,
TimeFieldPrefix,
TimeFieldSuffix,
Label,
Description,
} from "@heroui-vue/components";
import { IconClock, IconChevronDown } from "@tabler/icons-vue";
</script>
<template>
<TimeField class="w-[256px]" name="time">
<Label>时间</Label>
<TimeFieldGroup>
<TimeFieldPrefix><IconClock class="size-4 text-muted" /></TimeFieldPrefix>
<TimeFieldInput v-slot="{ segment }">
<TimeFieldSegment :segment="segment" />
</TimeFieldInput>
<TimeFieldSuffix>
<IconChevronDown class="size-4 text-muted" />
</TimeFieldSuffix>
</TimeFieldGroup>
<Description>输入时间</Description>
</TimeField>
</template>