feat: complete field documentation and TextArea examples

This commit is contained in:
maoyingjie
2026-10-21 23:41:57 +08:00
parent 37e11e6330
commit 116056832c
40 changed files with 2071 additions and 15 deletions
+17
View File
@@ -0,0 +1,17 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { FieldError, Input, Label, TextField } from "@heroui-vue/components";
const value = ref("jr");
const isInvalid = computed(
() => value.value.length > 0 && value.value.length < 3,
);
</script>
<template>
<TextField v-model="value" class="w-64" :is-invalid="isInvalid">
<Label for="username">用户名</Label>
<Input id="username" placeholder="输入用户名" />
<FieldError>用户名至少需要 3 个字符</FieldError>
</TextField>
</template>