From 35c5bdd642f767a49a99606660b867ee8cca5dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=9B=E4=BA=9A=E8=8A=B3?= Date: Sat, 5 Nov 2022 12:34:35 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-window.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 葛亚芳 --- .../reference/apis/js-apis-window.md | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) 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 7085b57dfc..9b8654b401 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -81,9 +81,9 @@ import window from '@ohos.window'; | 名称 | 参数类型 | 可读 | 可写 | 说明 | | --------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ | -| type | [WindowType](#windowtype) | 是 | 否 | 当前属性改变的系统栏类型,仅支持类型为导航栏、状态栏的系统栏。 | +| type | [WindowType](#windowtype7) | 是 | 否 | 当前属性改变的系统栏类型,仅支持类型为导航栏、状态栏的系统栏。 | | isEnable | boolean | 是 | 否 | 当前系统栏是否显示。 | -| region | [Rect](#rect) | 是 | 否 | 当前系统栏的位置及大小。 | +| region | [Rect](#rect7) | 是 | 否 | 当前系统栏的位置及大小。 | | backgroundColor | string | 是 | 否 | 系统栏背景颜色,为十六进制RGB或ARGB颜色,不区分大小写,例如`#00FF00`或`#FF00FF00`。 | | contentColor | string | 是 | 否 | 系统栏文字颜色。 | @@ -121,10 +121,10 @@ import window from '@ohos.window'; | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ---------- | ------------- | ---- | ---- | ------------------ | -| leftRect | [Rect](#rect) | 是 | 是 | 屏幕左侧的矩形区。 | -| topRect | [Rect](#rect) | 是 | 是 | 屏幕顶部的矩形区。 | -| rightRect | [Rect](#rect) | 是 | 是 | 屏幕右侧的矩形区。 | -| bottomRect | [Rect](#rect) | 是 | 是 | 屏幕底部的矩形区。 | +| leftRect | [Rect](#rect7) | 是 | 是 | 屏幕左侧的矩形区。 | +| topRect | [Rect](#rect7) | 是 | 是 | 屏幕顶部的矩形区。 | +| rightRect | [Rect](#rect7) | 是 | 是 | 屏幕右侧的矩形区。 | +| bottomRect | [Rect](#rect7) | 是 | 是 | 屏幕底部的矩形区。 | ## Size7+ @@ -145,8 +145,8 @@ import window from '@ohos.window'; | 名称 | 参数类型 | 可读 | 可写 | 说明 | | ------------------------------- | ------------------------- | ---- | ---- | -------------------------------------------- | -| windowRect7+ | [Rect](#rect) | 是 | 是 | 窗口尺寸。 | -| type7+ | [WindowType](#windowtype) | 是 | 是 | 窗口类型。 | +| windowRect7+ | [Rect](#rect7) | 是 | 是 | 窗口尺寸。 | +| type7+ | [WindowType](#windowtype7) | 是 | 是 | 窗口类型。 | | isFullScreen | boolean | 是 | 是 | 是否全屏,默认为false。 | | isLayoutFullScreen7+ | boolean | 是 | 是 | 窗口是否为沉浸式,默认为false。 | | focusable7+ | boolean | 是 | 否 | 窗口是否可聚焦,默认为true。 | @@ -182,7 +182,7 @@ create(id: string, type: WindowType, callback: AsyncCallback<Window>): voi | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------------------------- | ---- | ------------------------------------ | | id | string | 是 | 窗口id。 | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | | callback | AsyncCallback<[Window](#window)> | 是 | 回调函数。返回当前创建的子窗口对象。 | **示例:** @@ -212,7 +212,7 @@ create(id: string, type: WindowType): Promise<Window> | 参数名 | 类型 | 必填 | 说明 | | ------ | ------------------------- | ---- | ---------- | | id | string | 是 | 窗口id。 | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | **返回值:** @@ -247,7 +247,7 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback<Wi | -------- | -------------------------------------- | ---- | ------------------------------------------------------------ | | ctx | [Context](js-apis-Context.md) | 是 | 当前应用上下文信息。 | | id | string | 是 | 窗口id。 | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | | callback | AsyncCallback<[Window](#window)> | 是 | 回调函数。返回当前创建的子窗口对象。 | **示例:** @@ -280,7 +280,7 @@ create(ctx: Context, id: string, type: WindowType): Promise<Window> | ------ | ------------------------- | ---- | ------------------------------------------------------------ | | ctx | [Context](js-apis-Context.md) | 是 | 当前应用上下文信息。 | | id | string | 是 | 窗口id。 | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | **返回值:** @@ -495,7 +495,7 @@ on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): v | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | 是 | 监听事件,固定为'systemBarTintChange',即导航栏、状态栏属性变化事件。 | -| callback | Callback<[SystemBarTintState](#systembartintstate)> | 是 | 回调函数。返回当前的状态栏、导航栏信息集合。 | +| callback | Callback<[SystemBarTintState](#systembartintstate8)> | 是 | 回调函数。返回当前的状态栏、导航栏信息集合。 | **示例:** @@ -520,7 +520,7 @@ off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState >) | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | 是 | 监听事件,固定为'systemBarTintChange',即导航栏、状态栏属性变化事件。 | -| callback | Callback<[SystemBarTintState](#systembartintstate)> | 否 | 回调函数。返回当前的状态栏、导航栏信息集合。 | +| callback | Callback<[SystemBarTintState](#systembartintstate8)> | 否 | 回调函数。返回当前的状态栏、导航栏信息集合。 | **示例:** @@ -758,6 +758,10 @@ resetSize(width: number, height: number, callback: AsyncCallback<void>): v 改变当前窗口大小,使用callback异步回调。 +应用主窗口与子窗口存在大小限制,宽度范围:[320,2560],高度范围:[240,2560],单位为vp。 + +系统窗口存在大小限制,宽度范围:[0,2560],高度范围:[0,2560],单位为vp。 + **系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -786,6 +790,10 @@ resetSize(width: number, height: number): Promise<void> 改变当前窗口大小,使用Promise异步回调。 +应用主窗口与子窗口存在大小限制,宽度范围:[320,2560],高度范围:[240,2560],单位为vp。 + +系统窗口存在大小限制,宽度范围:[0,2560],高度范围:[0,2560],单位为vp。 + **系统能力:** SystemCapability.WindowManager.WindowManager.Core **参数:** @@ -826,7 +834,7 @@ setWindowType(type: WindowType, callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ---------- | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | | callback | AsyncCallback<void> | 是 | 回调函数。 | **示例:** @@ -856,7 +864,7 @@ setWindowType(type: WindowType): Promise<void> | 参数名 | 类型 | 必填 | 说明 | | ------ | ------------------------- | ---- | ---------- | -| type | [WindowType](#windowtype) | 是 | 窗口类型。 | +| type | [WindowType](#windowtype7) | 是 | 窗口类型。 | **返回值:** -- GitLab