From e3dfb694e4b3b3cd9e3a4a11f8d4db01f921c518 Mon Sep 17 00:00:00 2001 From: cy7717 Date: Tue, 9 May 2023 16:33:44 +0800 Subject: [PATCH] mod Signed-off-by: cy7717 --- .../application-models/inputmethodextentionability.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/application-models/inputmethodextentionability.md b/zh-cn/application-dev/application-models/inputmethodextentionability.md index 64e9ef1712..bf25496b84 100644 --- a/zh-cn/application-dev/application-models/inputmethodextentionability.md +++ b/zh-cn/application-dev/application-models/inputmethodextentionability.md @@ -103,10 +103,9 @@ public onDestroy(): void // 应用生命周期销毁 { - this.unRegisterListener(); // 注销事件监听 + this.unRegisterListener(); // 去注销事件监听 let win = windowManager.findWindow(this.windowName); win.destroyWindow(); // 销毁窗口 - this.mContext.destroy(); // 销毁InputMethodExtensionAbility服务 } private initWindow(): void // 初始化窗口 @@ -156,7 +155,7 @@ }) globalThis.inputAbility.on('inputStop', (imeId) => { if (imeId == "包名/Ability名") { - this.onDestroy(); + this.mContext.destroy(); // 销毁InputMethodExtensionAbility服务 } }); } -- GitLab