Files
heroui-vue/apps/docs/demos/textarea-controlled.vue

21 lines
504 B
Vue
Raw Permalink 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 { ref } from "vue";
import { Description, TextArea } from "@heroui-vue/components";
const value = ref("");
</script>
<template>
<div class="flex w-96 flex-col gap-2">
<TextArea
v-model="value"
aria-describedby="textarea-controlled-description"
aria-label="公告"
placeholder="撰写公告…"
/>
<Description id="textarea-controlled-description">
字符数: {{ value.length }} / 280
</Description>
</div>
</template>