feat: complete field documentation and TextArea examples
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
Description,
|
||||
Input,
|
||||
Label,
|
||||
TextArea,
|
||||
TextField,
|
||||
} from "@heroui-vue/components";
|
||||
|
||||
const name = ref("");
|
||||
const bio = ref("");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex w-full max-w-64 flex-col gap-4">
|
||||
<TextField v-model="name" name="name">
|
||||
<Label>显示名称</Label>
|
||||
<Input placeholder="Jane" />
|
||||
<Description>字符数: {{ name.length }}</Description>
|
||||
</TextField>
|
||||
<TextField v-model="bio" name="bio">
|
||||
<Label>个人简介</Label>
|
||||
<TextArea placeholder="介绍一下你自己…" />
|
||||
<Description>字符数: {{ bio.length }} / 200</Description>
|
||||
</TextField>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user