For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/components/form/text-area.md.

text-area

多行文本输入组件,支持自动高度、字数限制等功能。

扫码预览

扫码预览 text-area

Props

属性名类型默认值必填说明
bouncesbooleantrue否iOS 弹性效果
classNamestring-否组件类名
confirmType"search" | "next" | "send" | "go" | "done"'done'否键盘右下角确认按钮的类型
disabledbooleanfalse否是否禁用
idstring-否元素的唯一标识
keystring | number | null-否React key 属性
lineSpacingnumber | `${number}px` | `${number}rpx`-否行间距
maxlengthnumber140否最大输入长度
maxlinesnumber-否最大行数
onBlur(event: BaseEvent<"bindblur", TextAreaBlurEvent>) => void-否失焦时触发
onConfirm(event: BaseEvent<"bindconfirm", TextAreaConfirmEvent>) => void-否点击键盘确认按钮时触发
onFocus(event: BaseEvent<"bindfocus", TextAreaFocusEvent>) => void-否聚焦时触发
onInput(event: BaseEvent<"bindinput", TextAreaInputEvent>) => void-否输入内容变化时触发
onSelectionChange(event: BaseEvent<"bindselection", TextAreaSelectionChangeEvent>) => void-否选择区域变化时触发
placeholderstring-否占位符文本
readonlybooleanfalse否是否只读
refRef<NodesRef>-否用于获取组件实例的 ref
showSoftInputOnFocusbooleantrue否聚焦时是否显示软键盘
styleCSSProperties-否组件样式