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,
|
||||
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>
|
||||
Reference in New Issue
Block a user