modify onchange callback for compatibility issues

Signed-off-by: c30016310 <chenpeng242@huawei.com>
Change-Id: I072566757fe8b18d35047b16eb0cef5dcfe83be3
This commit is contained in:
c30016310 2024-07-08 19:58:51 +08:00
parent a1aaa5e29a
commit 8a6c9439de

View File

@ -301,14 +301,14 @@ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRang
* Callback when input sometimes has info of previewText.
*
* @typedef { function } EditableTextOnChangeCallback
* @param { string } value - Value of all text.
* @param { TextRange } [previewRange] - index of previewText in content.
* @param { string } value - Value of body text, without previewText value.
* @param { PreviewText } [previewText] - info of previewText, contains previewText value and start index.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare type EditableTextOnChangeCallback = (value: string, previewRange?: TextRange) => void;
declare type EditableTextOnChangeCallback = (value: string, previewText?: PreviewText) => void;
/**
* Define the text selection controller.