From d0ee7a14f72884e4f46830cadb16bcfda429c9ef Mon Sep 17 00:00:00 2001 From: yuyaozhi Date: Wed, 23 Mar 2022 17:50:12 +0800 Subject: [PATCH] Fix error code issue of ability api in March 23rd Signed-off-by: yuyaozhi --- .../reference/apis/js-apis-appmanager.md | 12 ------------ .../reference/apis/js-apis-featureAbility.md | 6 +----- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-appmanager.md b/zh-cn/application-dev/reference/apis/js-apis-appmanager.md index 7d82b8f415..86c762a4e1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-appmanager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-appmanager.md @@ -82,13 +82,11 @@ isRamConstrainedDevice(): Promise\; **示例:** ```js - IsRamConstrainedDevicePromise(){ app.isRamConstrainedDevicePromise().then((data) => { console.log('success:' + JSON.stringify(data)); }).catch((error) => { console.log('failed:' + JSON.stringify(error)); }); - } ``` ## appManager.isRamConstrainedDevice @@ -108,12 +106,10 @@ isRamConstrainedDevice(callback: AsyncCallback\): void; **示例:** ```js - IsRamConstrainedDeviceCallBack(){ app.isRamConstrainedDevicePromise((err, data) => { console.log('startAbility result failed:' + JSON.stringify(err)); console.log('startAbility result success:' + JSON.stringify(data)); }) - } ``` ## appManager.getAppMemorySize @@ -133,13 +129,11 @@ getAppMemorySize(): Promise\; **示例:** ```js - GetAppMemorySize(){ app.getAppMemorySize().then((data) => { console.log('success:' + JSON.stringify(data)); }).catch((error) => { console.log('failed:' + JSON.stringify(error)); }); - } ``` ## appManager.getAppMemorySize @@ -159,12 +153,10 @@ getAppMemorySize(callback: AsyncCallback\): void; **示例:** ```js - GetAppMemorySizeCallBack(){ app.getAppMemorySize((err, data) => { console.log('startAbility result failed :' + JSON.stringify(err)); console.log('startAbility result success:' + JSON.stringify(data)); }) - } ``` ## appManager.getProcessRunningInfos8+ @@ -183,13 +175,11 @@ getProcessRunningInfos(): Promise>; **示例:** ```js - GetProcessRunningInfos(){ app.GetProcessRunningInfos().then((data) => { console.log('success:' + JSON.stringify(data)); }).catch((error) => { console.log('failed:' + JSON.stringify(error)); }); - } ``` ## appManager.getProcessRunningInfos8+ @@ -209,12 +199,10 @@ getProcessRunningInfos(callback: AsyncCallback>): void **示例:** ```js - GetProcessRunningInfosCallBack(){ app.GetProcessRunningInfos((err, data) => { console.log('startAbility result failed :' + JSON.stringify(err)); console.log('startAbility result success:' + JSON.stringify(data)); }) - } ``` ## ProcessRunningInfo diff --git a/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md b/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md index 96dc62be64..8b967b0785 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-featureAbility.md @@ -665,9 +665,7 @@ getWindow(callback: AsyncCallback\): void **示例:** ```javascript -GetWindow(){ featureAbility.getWindow() - } ``` ## featureAbility.getWindow7+ @@ -687,11 +685,9 @@ getWindow(): Promise\; **示例:** ```javascript -GetWindowPromise(){ featureAbility.getWindow().then((data) => { console.info("=============getWindowPromise========== " + JSON.stringify(data)); - }); - } + }); ``` ## ConnectOptions.onConnect7+ -- GitLab