From cee270cbbd04516017f7af0cc537d16a76ebf74c Mon Sep 17 00:00:00 2001 From: Hollokin Date: Sun, 7 May 2023 10:59:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=89=93=E5=8D=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=BB=9F=E4=B8=80=E7=94=A8console.error=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hollokin --- .../apis/js-apis-inputmethodengine.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) 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 32b4723915..906c0ec59e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md @@ -514,13 +514,13 @@ let panelInfo: inputMethodEngine.PanelInfo = { try { inputMethodEngine.getInputMethodAbility().createPanel(this.context, panelInfo, (err, panel) => { if (err) { - console.log(`Failed to createPanel: ${JSON.stringify(err)}`); + console.error(`Failed to createPanel: ${JSON.stringify(err)}`); return; } console.log('Succeed in creating panel.'); }) } catch(err) { - console.log(`Failed to createPanel: ${JSON.stringify(err)}`); + console.error(`Failed to createPanel: ${JSON.stringify(err)}`); } ``` @@ -562,7 +562,7 @@ let panelInfo: inputMethodEngine.PanelInfo = { inputMethodEngine.getInputMethodAbility().createPanel(this.context, panelInfo).then((panel) => { console.log('Succeed in creating panel.'); }).catch((err) => { - console.log(`Failed to create panel: ${JSON.stringify(err)}`); + console.error(`Failed to create panel: ${JSON.stringify(err)}`); }) ``` @@ -591,26 +591,26 @@ let panelInfo: inputMethodEngine.PanelInfo = { try { inputMethodEngine.getInputMethodAbility().createPanel(this.context, panelInfo, (err, panel) => { if (err) { - console.log(`Failed to create panel: ${JSON.stringify(err)}`); + console.error(`Failed to create panel: ${JSON.stringify(err)}`); return; } globalThis.inputMethodPanel = panel; console.log('Succeed in creating panel.'); }) } catch(err) { - console.log(`Failed to create panel: ${JSON.stringify(err)}`); + console.error(`Failed to create panel: ${JSON.stringify(err)}`); } try { inputMethodEngine.getInputMethodAbility().destroyPanel(globalThis.inputMethodPanel, (err) => { if(err !== undefined) { - console.log(`Failed to destroy panel: ${JSON.stringify(err)}`); + console.error(`Failed to destroy panel: ${JSON.stringify(err)}`); return; } console.log('Succeed in destroying panel.'); }) } catch(err) { - console.log(`Failed to destroy panel: ${JSON.stringify(err)}`); + console.error(`Failed to destroy panel: ${JSON.stringify(err)}`); } ``` @@ -643,24 +643,24 @@ let panelInfo: inputMethodEngine.PanelInfo = { try { inputMethodEngine.getInputMethodAbility().createPanel(this.context, panelInfo, (err, panel) => { if (err) { - console.log(`Failed to create panel: ${JSON.stringify(err)}`); + console.error(`Failed to create panel: ${JSON.stringify(err)}`); return; } globalThis.inputMethodPanel = panel; console.log('Succeed in creating panel.'); }) } catch(err) { - console.log(`Failed to create panel: ${JSON.stringify(err)}`); + console.error(`Failed to create panel: ${JSON.stringify(err)}`); } try { inputMethodEngine.getInputMethodAbility().destroyPanel(globalThis.inputMethodPanel).then(() => { console.log('Succeed in destroying panel.'); }).catch((err) => { - console.log(`Failed to destroy panel: ${JSON.stringify(err)}`); + console.error(`Failed to destroy panel: ${JSON.stringify(err)}`); }); } catch (err) { - console.log(`Failed to destroy panel: ${JSON.stringify(err)}`); + console.error(`Failed to destroy panel: ${JSON.stringify(err)}`); } ``` @@ -2177,7 +2177,7 @@ try { console.error(`Failed to moveCursor: ${JSON.stringify(err)}`); }); } catch (err) { - console.log(`Failed to moveCursor: ${JSON.stringify(err)}`); + console.error(`Failed to moveCursor: ${JSON.stringify(err)}`); } ``` @@ -2260,7 +2260,7 @@ try { console.error(`Failed to selectByRange: ${JSON.stringify(err)}`); }); } catch (err) { - console.log(`Failed to selectByRange: ${JSON.stringify(err)}`); + console.error(`Failed to selectByRange: ${JSON.stringify(err)}`); } ``` @@ -2343,7 +2343,7 @@ try { console.error(`Failed to selectByMovement: ${JSON.stringify(err)}`); }); } catch (err) { - console.log(`Failed to selectByMovement: ${JSON.stringify(err)}`); + console.error(`Failed to selectByMovement: ${JSON.stringify(err)}`); } ``` -- GitLab