From 60a06c7bb0781f78f0bf0af2ea8be7408524293a Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Sat, 30 Jul 2022 09:19:27 +0800 Subject: [PATCH] Signed-off-by: ma-shaoyin Changes to be committed: --- .../reference/apis/js-apis-inputmethod.md | 2 +- .../apis/js-apis-inputmethodengine.md | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md index fb79e60c51..9b0d1e2cf0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md @@ -10,7 +10,7 @@ ## 导入模块 ``` -import inputMethod from '@ohos.inputMethod'; +import inputMethod from '@ohos.inputmethod'; ``` ## inputMethod8+ diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md index 4383626237..ddc0e6700b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md @@ -8,7 +8,7 @@ ## 导入模块 ``` -import inputMethodEngine from '@ohos.inputMethodEngine'; +import inputMethodEngine from '@ohos.inputmethodengine'; ``` ## inputMethodEngine @@ -180,7 +180,7 @@ off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void ```js InputMethodEngine.off('keyboardShow'); ``` - + ## KeyboardDelegate @@ -250,7 +250,7 @@ on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) = **示例:** - + ```js KeyboardDelegate.on('cursorContextChange', (x, y, height) => { console.info('cursorContextChange'); @@ -294,7 +294,7 @@ on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegi | callback | number | 是 | 回调返回文本选择信息。 | **示例:** - + ```js KeyboardDelegate.on('selectionChange', (oldBegin, oldEnd, newBegin, newEnd) => { console.info('selectionChange'); @@ -548,11 +548,11 @@ deleteForward(length:number): Promise<boolean> **系统能力**: SystemCapability.MiscServices.InputMethodFramework **参数:** - + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | length | number | 是 | 文本长度。 | - + **返回值:** | 类型 | 说明 | @@ -565,7 +565,7 @@ deleteForward(length:number): Promise<boolean> var isSuccess = TextInputClient.deleteForward(5); console.info("isSuccess = " + isSuccess); ``` - + ### deleteBackward deleteBackward(length:number, callback: AsyncCallback<boolean>): void @@ -663,7 +663,7 @@ sendKeyFunction(action:number): Promise<boolean> var isSuccess = TextInputClient.sendKeyFunction(inputMethod.ENTER_KEY_TYPE_NEXT); console.info("isSuccess = " + isSuccess); ``` - + ### insertText insertText(text:string, callback: AsyncCallback<boolean>): void @@ -702,7 +702,7 @@ insertText(text:string): Promise<boolean> | text | string | 是 | 文本。 | **返回值:** - + | 类型 | 说明 | | ------------------------------- | ------------------------------------------------------------ | | Promise<boolean> | 操作成功与否。 | @@ -713,7 +713,7 @@ insertText(text:string): Promise<boolean> var isSuccess = TextInputClient.insertText("test"); console.info("isSuccess = " + isSuccess); ``` - + ### getEditorAttribute getEditorAttribute(callback: AsyncCallback<EditorAttribute>): void -- GitLab