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

23 lines
569 B
Vue

<script setup lang="ts">
import {
TimeField,
TimeFieldGroup,
TimeFieldInput,
TimeFieldSegment,
TimeFieldPrefix,
Label,
} from "@heroui-vue/components";
import { IconClock } 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>
</TimeFieldGroup>
</TimeField>
</template>