#text-area
多行文本输入组件,支持自动高度、字数限制等功能。
#扫码预览
#Props
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| bounces | boolean | true | 否 | iOS 弹性效果 |
| className | string | - | 否 | 组件类名 |
| confirmType | "search" | "next" | "send" | "go" | "done" | 'done' | 否 | 键盘右下角确认按钮的类型 |
| disabled | boolean | false | 否 | 是否禁用 |
| id | string | - | 否 | 元素的唯一标识 |
| key | string | number | null | - | 否 | React key 属性 |
| lineSpacing | number | `${number}px` | `${number}rpx` | - | 否 | 行间距 |
| maxlength | number | 140 | 否 | 最大输入长度 |
| maxlines | number | - | 否 | 最大行数 |
| 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 | - | 否 | 选择区域变化时触发 |
| placeholder | string | - | 否 | 占位符文本 |
| readonly | boolean | false | 否 | 是否只读 |
| ref | Ref<NodesRef> | - | 否 | 用于获取组件实例的 ref |
| showSoftInputOnFocus | boolean | true | 否 | 聚焦时是否显示软键盘 |
| style | CSSProperties | - | 否 | 组件样式 |