# TextArea > **说明:** >该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 提供多行文本输入组件。 ## 权限列表 无 ## 子组件 无 ## 接口 TextArea\(value?: \{ placeholder?: string \}\) - 参数
参数名 |
参数类型 |
必填 |
默认值 |
参数描述 |
|---|---|---|---|---|
placeholder |
string |
否 |
- |
无输入时的提示文本。 |
名称 |
参数类型 |
默认值 |
描述 |
|---|---|---|---|
placeholderColor |
Color |
- |
设置placeholder文本颜色。 |
placeholderFont |
{ size?: number, weight?:number | FontWeight, family?: string, style?: FontStyle } |
- |
设置placeholder文本样式:
|
textAlign |
TextAlign |
TextAlign.Start |
设置文本水平对齐方式。 |
caretColor |
Color |
- |
设置输入框光标颜色。 |
名称 |
描述 |
|---|---|
Start |
水平对齐首部。 |
Center |
水平居中对齐。 |
End |
水平对齐尾部。 |
名称 |
功能描述 |
|
|---|---|---|
onChange(callback: (value: string) => void) |
输入发生变化时,触发回调。 |
|