Skip to content

TAutosize / 自适应文本域

Autosize renders a textarea that automatically adjusts its height based on content. Supports min/max rows and all standard textarea attributes. / 自适应文本域根据内容自动调整高度,支持最小/最大行数和所有标准 textarea 属性。

Props / 属性

PropType / 类型Default / 默认值Description / 说明
rowsnumber3Min rows
maxRowsnumberMax rows before scrolling
placeholderstringPlaceholder text
disabledbooleanfalseDisabled
maxlengthnumberMax 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>