feat: migrate NumberField with form integration and docs

This commit is contained in:
maoyingjie
2026-10-23 11:48:06 +08:00
parent 7fc8315037
commit 23527d4e4c
43 changed files with 2788 additions and 9 deletions
@@ -0,0 +1,41 @@
<script setup lang="ts">
import {
Label,
NumberField,
NumberFieldDecrementButton,
NumberFieldGroup,
NumberFieldIncrementButton,
NumberFieldInput,
} from "@heroui-vue/components";
import { IconChevronUp, IconChevronDown } from "@tabler/icons-vue";
</script>
<template>
<NumberField
class="w-full max-w-64"
:defaultValue="99"
:minValue="0"
name="amount"
:formatOptions="{
currency: 'EUR',
currencySign: 'accounting',
style: 'currency',
}"
>
<Label>带 Chevron 的数字输入框</Label>
<NumberFieldGroup class="flex">
<NumberFieldInput class="flex-1" />
<div class="flex h-full flex-col border-s border-field-placeholder/15">
<NumberFieldIncrementButton
class="flex h-1/2 w-6 items-center justify-center rounded-none border-0 pt-0.5 text-sm"
>
<IconChevronUp :size="11" aria-hidden="true" />
</NumberFieldIncrementButton>
<NumberFieldDecrementButton
class="flex h-1/2 w-6 items-center justify-center rounded-none border-0 pb-0.5 text-sm"
>
<IconChevronDown :size="11" aria-hidden="true" />
</NumberFieldDecrementButton>
</div>
</NumberFieldGroup>
</NumberField>
</template>