From 1a5a20f832a38605790c14accc1bebae5485f74e Mon Sep 17 00:00:00 2001 From: cy7717 Date: Mon, 20 Mar 2023 20:28:30 +0800 Subject: [PATCH] mod Signed-off-by: cy7717 --- .../reference/apis/js-apis-inputmethod.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 1679024281..a164e9c18c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md @@ -398,12 +398,13 @@ let inputMethodProperty = { id: im.methodId, extra: {} } +let imSubType = inputMethod.getCurrentInputMethodSubtype(); try { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, { - id: "ServiceExtAbility", + id: "imSubType.id", label: "", - name: "com.example.kikakeyboard", - mode: "upper", + name: "imSubType.name", + mode: "", locale: "", language: "", icon: "", @@ -468,12 +469,13 @@ let inputMethodProperty = { id: im.methodId, extra: {} } +let imSubType = inputMethod.getCurrentInputMethodSubtype(); try { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, { - id: im.methodId, + id: imSubType.id, label: "", - name: im.packageName, - mode: "upper", + name: imSubType.name, + mode: "", locale: "", language: "", icon: "", -- GitLab