diff --git a/zh-cn/application-dev/reference/apis/js-apis-screen.md b/zh-cn/application-dev/reference/apis/js-apis-screen.md index 714cfacfe0b4214c68d8d7f739f2fecb3d6f23bd..9472f9f6d445586231e7bbb44ec1c87b1cc1dc52 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-screen.md +++ b/zh-cn/application-dev/reference/apis/js-apis-screen.md @@ -223,6 +223,8 @@ createVirtualScreen(options:VirtualScreenOption, callback: AsyncCallback<Scre **系统能力:** SystemCapability.WindowManager.WindowManager.Core +**需要权限**:ohos.permission.CAPTURE_SCREEN,如果VirtualScreenOption.surfaceId有效,此权限是必需的。仅系统应用可用。 + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -256,6 +258,8 @@ createVirtualScreen(options:VirtualScreenOption): Promise<Screen> **系统能力:** SystemCapability.WindowManager.WindowManager.Core +**需要权限**:ohos.permission.CAPTURE_SCREEN,如果VirtualScreenOption.surfaceId有效,此权限是必需的。仅系统应用可用。 + **参数:** | 参数名 | 类型 | 必填 | 说明 | | ------- | ------------------------------------------- | ---- | ------------------------ | @@ -343,6 +347,8 @@ setVirtualScreenSurface(screenId:number, surfaceId: string, callback: AsyncCallb **系统能力:** SystemCapability.WindowManager.WindowManager.Core +**需要权限**:ohos.permission.CAPTURE_SCREEN,仅系统应用可用。 + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -372,6 +378,8 @@ setVirtualScreenSurface(screenId:number, surfaceId: string): Promise<void> **系统能力:** SystemCapability.WindowManager.WindowManager.Core +**需要权限**:ohos.permission.CAPTURE_SCREEN,仅系统应用可用。 + **参数:** | 参数名 | 类型 | 必填 | 说明 | | --------- | ------ | ---- | ------------- | @@ -696,9 +704,6 @@ promise.then((data) => { | HORIZONTAL | 2 | 表示指定屏幕为水平方向。 | | REVERSE_VERTICAL | 3 | 表示指定屏幕为反向垂直方向。 | | REVERSE_HORIZONTAL | 4 | 表示指定屏幕为反向水平方向。 | -| SENSOR | 5 | 表示屏幕方向跟随传感器方向。 | -| SENSOR_VERTICAL | 6 | 表示屏幕方向垂直跟随传感器方向。 | -| SENSOR_HORIZONTAL | 7 | 表示屏幕方向水平跟随传感器方向。 | ## ScreenModeInfo 屏幕显示模式信息。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-window.md b/zh-cn/application-dev/reference/apis/js-apis-window.md index 21f94b1970b8371ad03a1ae5de2b03e256b5a2c7..e86c86235a5022f46d72eeee268f28a52f10df8d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -1856,8 +1856,8 @@ on(type: 'avoidAreaChange', callback: Callback<{[AvoidAreaType](#avoidareatyp **示例:** ```js -windowClass.on('avoidAreaChange', (type, data) => { - console.info('Succeeded in enabling the listener for system avoid area changes. type:' + JSON.stringify(type) + 'Data: ' + JSON.stringify(data)); +windowClass.on('avoidAreaChange', (data) => { + console.info('Succeeded in enabling the listener for system avoid area changes. type:' + JSON.stringify(data.type) + ', area: ' + JSON.stringify(data.area)); }); ```