提交 873a068b 编写于 作者: L limeng

textarea setselection接口说明

Signed-off-by: Nlimeng <limeng208@huawei.com>
上级 a13c0e65
...@@ -81,14 +81,14 @@ caretPosition(value: number): void ...@@ -81,14 +81,14 @@ caretPosition(value: number): void
setTextSelection(selectionStart: number, selectionEnd: number): void setTextSelection(selectionStart: number, selectionEnd: number): void
组件在获焦状态下,调用该接口设置文本选择区域并高亮显示。<br/>当接口入参(selectionStart或selectionEnd)小于0时、按照0处理;当接口入参大于文字最大长度时、按照文字最大长度处理。<br/>只有在selectionStart小于selectionEnd时,文字才会被选取、高亮显示。 组件在获焦状态下,调用该接口设置文本选择区域并高亮显示。<br/>只有在selectionStart小于selectionEnd时,文字才会被选取、高亮显示。<br/>
**参数:** **参数:**
| 参数名 | 参数类型 | 必填 | 参数描述 | | 参数名 | 参数类型 | 必填 | 参数描述 |
| -------------- | -------- | ---- | ------------------ | | -------------- | -------- | ---- | ------------------------------------------------------------ |
| selectionStart | number | 是 | 文本选择区域起始位置,文本框中文字的起始位置为0。 | | selectionStart | number | 是 | 文本选择区域起始位置,文本框中文字的起始位置为0。<br/>当selectionStart小于0时、按照0处理;当selectionStart大于文字最大长度时、按照文字最大长度处理。<br/> |
| selectionEnd | number | 是 | 文本选择区域结束位置。 | | selectionEnd | number | 是 | 文本选择区域结束位置。<br/>当selectionEnd小于0时、按照0处理;当selectionEnd大于文字最大长度时、按照文字最大长度处理。<br/> |
## 示例 ## 示例
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册