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 1679024281b54a3675a95b27e9006357c92ddc08..a164e9c18cbfa11a480cb58cd5a22ca1b46fd6df 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: "",