feat: complete field documentation and TextArea examples
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user