Files
heroui-vue/apps/docs/demos/number-field-custom-icons.vue
T

30 lines
912 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
Description,
Label,
NumberField,
NumberFieldDecrementButton,
NumberFieldGroup,
NumberFieldIncrementButton,
NumberFieldInput,
} from "@heroui-vue/components";
import { IconZoomOut, IconZoomIn } from "@tabler/icons-vue";
</script>
<template>
<div class="flex w-full max-w-64 flex-col gap-4">
<NumberField :defaultValue="1024" :minValue="0" name="width">
<Label>宽度(自定义图标)</Label>
<NumberFieldGroup>
<NumberFieldDecrementButton>
<IconZoomOut :size="16" aria-hidden="true" />
</NumberFieldDecrementButton>
<NumberFieldInput class="w-[120px]" />
<NumberFieldIncrementButton>
<IconZoomIn :size="16" aria-hidden="true" />
</NumberFieldIncrementButton>
</NumberFieldGroup>
<Description>自定义图标子元素</Description>
</NumberField>
</div>
</template>