diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md index 4260c7b89347bc7fd63306f6c819ec1483697212..a3ea558edb18deb61a31af982674cfe136de706c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md @@ -81,14 +81,14 @@ caretPosition(value: number): void setTextSelection(selectionStart: number, selectionEnd: number): void -组件在获焦状态下,调用该接口设置文本选择区域并高亮显示。
当接口入参(selectionStart或selectionEnd)小于0时、按照0处理;当接口入参大于文字最大长度时、按照文字最大长度处理。
只有在selectionStart小于selectionEnd时,文字才会被选取、高亮显示。 +组件在获焦状态下,调用该接口设置文本选择区域并高亮显示。
只有在selectionStart小于selectionEnd时,文字才会被选取、高亮显示。
**参数:** -| 参数名 | 参数类型 | 必填 | 参数描述 | -| -------------- | -------- | ---- | ------------------ | -| selectionStart | number | 是 | 文本选择区域起始位置,文本框中文字的起始位置为0。 | -| selectionEnd | number | 是 | 文本选择区域结束位置。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------------- | -------- | ---- | ------------------------------------------------------------ | +| selectionStart | number | 是 | 文本选择区域起始位置,文本框中文字的起始位置为0。
当selectionStart小于0时、按照0处理;当selectionStart大于文字最大长度时、按照文字最大长度处理。
| +| selectionEnd | number | 是 | 文本选择区域结束位置。
当selectionEnd小于0时、按照0处理;当selectionEnd大于文字最大长度时、按照文字最大长度处理。
| ## 示例