feat: migrate public TimeField with shared date input parts

This commit is contained in:
maoyingjie
2026-10-26 17:56:41 +08:00
parent d74ad1b711
commit 97263d82e1
45 changed files with 2415 additions and 61 deletions
+38
View File
@@ -0,0 +1,38 @@
<script setup lang="ts">
import {
TimeField,
TimeFieldGroup,
TimeFieldInput,
TimeFieldSegment,
TimeFieldPrefix,
TimeFieldSuffix,
Label,
} from "@heroui-vue/components";
import { IconClock, IconChevronDown } from "@tabler/icons-vue";
</script>
<template>
<div class="w-[400px] space-y-4">
<TimeField full-width name="time">
<Label>时间</Label>
<TimeFieldGroup full-width>
<TimeFieldInput v-slot="{ segment }">
<TimeFieldSegment :segment="segment" />
</TimeFieldInput>
</TimeFieldGroup>
</TimeField>
<TimeField full-width name="time-icons">
<Label>时间</Label>
<TimeFieldGroup full-width>
<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>
</TimeField>
</div>
</template>