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
+40
View File
@@ -0,0 +1,40 @@
<script setup lang="ts">
import {
Label,
NumberField,
NumberFieldDecrementButton,
NumberFieldGroup,
NumberFieldIncrementButton,
NumberFieldInput,
} from "@heroui-vue/components";
</script>
<template>
<div class="flex flex-col gap-4">
<NumberField
:defaultValue="100"
:minValue="0"
name="primary-width"
variant="primary"
>
<Label>主要变体</Label>
<NumberFieldGroup>
<NumberFieldDecrementButton />
<NumberFieldInput class="w-[120px]" />
<NumberFieldIncrementButton />
</NumberFieldGroup>
</NumberField>
<NumberField
:defaultValue="100"
:minValue="0"
name="secondary-width"
variant="secondary"
>
<Label>次要变体</Label>
<NumberFieldGroup>
<NumberFieldDecrementButton />
<NumberFieldInput class="w-[120px]" />
<NumberFieldIncrementButton />
</NumberFieldGroup>
</NumberField>
</div>
</template>