未验证 提交 7d03741c 编写于 作者: O openharmony_ci 提交者: Gitee

!15881 【新增接口】TextInputController新增setTextSelection接口

Merge pull request !15881 from 张潇/dev
......@@ -110,7 +110,18 @@ caretPosition(value: number): void
| 参数名 | 参数类型 | 必填 | 参数描述 |
| ------ | -------- | ---- | -------------------------------------- |
| value | number | 是 | 从字符串开始到光标所在位置的字符长度。 |
### setTextSelection<sup>10+</sup>
setTextSelection(selectionStart:&nbsp;number, selectionStart:&nbsp;number): void
设置文本选择区域并高亮显示。
**参数:**
| 参数名 | 参数类型 | 必填 | 参数描述 |
| -------------- | -------- | ---- | ---------------------- |
| selectionStart | number | 是 | 文本选择区域起始位置,文本框中文字的起始位置为0。 |
| selectionEnd | number | 是 | 文本选择区域结束位置。 |
## 示例
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册