feat: migrate public TimeField with shared date input parts
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
TimeField,
|
||||
TimeFieldGroup,
|
||||
TimeFieldInput,
|
||||
TimeFieldSegment,
|
||||
TimeFieldPrefix,
|
||||
Label,
|
||||
Description,
|
||||
Surface,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconClock } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<Surface class="flex w-full max-w-sm flex-col gap-4 rounded-3xl p-6">
|
||||
<TimeField class="w-full" name="time">
|
||||
<Label>时间</Label>
|
||||
<TimeFieldGroup variant="secondary">
|
||||
<TimeFieldInput v-slot="{ segment }">
|
||||
<TimeFieldSegment :segment="segment" />
|
||||
</TimeFieldInput>
|
||||
</TimeFieldGroup>
|
||||
<Description>输入时间</Description>
|
||||
</TimeField>
|
||||
<TimeField class="w-full" name="time-2">
|
||||
<Label>预约时间</Label>
|
||||
<TimeFieldGroup variant="secondary">
|
||||
<TimeFieldPrefix>
|
||||
<IconClock class="size-4 text-muted" />
|
||||
</TimeFieldPrefix>
|
||||
<TimeFieldInput v-slot="{ segment }">
|
||||
<TimeFieldSegment :segment="segment" />
|
||||
</TimeFieldInput>
|
||||
</TimeFieldGroup>
|
||||
<Description>输入预约时间</Description>
|
||||
</TimeField>
|
||||
</Surface>
|
||||
</template>
|
||||
Reference in New Issue
Block a user