feat: migrate DateField and shared date input group
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
DateField,
|
||||
DateFieldGroup,
|
||||
DateFieldInput,
|
||||
DateFieldSegment,
|
||||
DateFieldPrefix,
|
||||
Label,
|
||||
Description,
|
||||
Surface,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconCalendar } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<Surface class="flex w-full max-w-sm flex-col gap-4 rounded-3xl p-6">
|
||||
<DateField class="w-full" name="date">
|
||||
<Label>日期</Label>
|
||||
<DateFieldGroup variant="secondary">
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入日期</Description>
|
||||
</DateField>
|
||||
<DateField class="w-full" name="date-2">
|
||||
<Label>预约日期</Label>
|
||||
<DateFieldGroup variant="secondary">
|
||||
<DateFieldPrefix>
|
||||
<IconCalendar class="size-4 text-muted" />
|
||||
</DateFieldPrefix>
|
||||
<DateFieldInput v-slot="{ segment }">
|
||||
<DateFieldSegment :segment="segment" />
|
||||
</DateFieldInput>
|
||||
</DateFieldGroup>
|
||||
<Description>输入预约日期</Description>
|
||||
</DateField>
|
||||
</Surface>
|
||||
</template>
|
||||
Reference in New Issue
Block a user