From c04bcba5bb93cd96ec0b3dc8d31b6becc80f22f3 Mon Sep 17 00:00:00 2001 From: zhaolinglan Date: Tue, 27 Sep 2022 10:34:22 +0800 Subject: [PATCH] modify code Signed-off-by: zhaolinglan --- .../application-dev/reference/apis/js-apis-inputmethod.md | 8 -------- 1 file changed, 8 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 15ba13dab7..91f8b10169 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md @@ -347,14 +347,12 @@ listInputMethod(enable: boolean, callback: AsyncCallback<Array<InputMethod **示例:** ```js -imeList: Array = null InputMethodSetting.listInputMethod(true, (err,data) => { if (err) { console.error('listInputMethod failed because: ' + JSON.stringify(err)); return; } console.log('listInputMethod success'); - this.imeList = data; }); ``` @@ -381,10 +379,8 @@ listInputMethod(enable: boolean): Promise<Array<InputMethodProperty>> **示例:** ```js -imeList: Array = null InputMethodSetting.listInputMethod(true).then((data) => { console.info('listInputMethod success'); - this.imeList = data; }).catch((err) => { console.error('listInputMethod promise err: ' + err); }) @@ -407,14 +403,12 @@ listInputMethod(callback: AsyncCallback<Array<InputMethodProperty>>) **示例:** ```js -imeList: Array = null InputMethodSetting.listInputMethod((err,data) => { if (err) { console.error('listInputMethod failed because: ' + JSON.stringify(err)); return; } console.log('listInputMethod success'); - this.imeList = data; }); ``` @@ -435,10 +429,8 @@ listInputMethod(): Promise<Array<InputMethodProperty>> **示例:** ```js -imeList: Array = null InputMethodSetting.listInputMethod().then((data) => { console.info('listInputMethod success'); - this.imeList = data; }).catch((err) => { console.error('listInputMethod promise err: ' + err); }) -- GitLab