TAutosize / 自适应文本域
Autosize renders a textarea that automatically adjusts its height based on content. Supports min/max rows and all standard textarea attributes. / 自适应文本域根据内容自动调整高度,支持最小/最大行数和所有标准 textarea 属性。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
rows | number | 3 | Min rows |
maxRows | number | — | Max rows before scrolling |
placeholder | string | — | Placeholder text |
disabled | boolean | false | Disabled |
maxlength | number | — | Max length |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TAutosize } from '@gulcc/tabler-vue'
const text = ref('')
</script>
<template>
<TAutosize v-model="text" placeholder="Enter text / 输入文字" :rows="3" :max-rows="10" />
</template>