From 631c659d609d2901bcc6f035d1b7dc362e39f3e8 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Thu, 31 Aug 2023 15:04:20 +0800 Subject: [PATCH] Update docs (23318) Signed-off-by: ester.zhou --- .../apis/common_event/commonEvent-window.md | 2 +- .../apis/js-apis-system-parameter.md | 42 +++++++++++------- .../apis/js-apis-system-parameterEnhance.md | 44 ++++++++++++------- .../v3.2-Release/changelogs-arkui.md | 8 ++++ 4 files changed, 63 insertions(+), 33 deletions(-) diff --git a/en/application-dev/reference/apis/common_event/commonEvent-window.md b/en/application-dev/reference/apis/common_event/commonEvent-window.md index b656008573..9409d18d0f 100644 --- a/en/application-dev/reference/apis/common_event/commonEvent-window.md +++ b/en/application-dev/reference/apis/common_event/commonEvent-window.md @@ -1,7 +1,7 @@ # Common Events of the Window Management Subsystem This document lists the common system events provided by the window management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. -### COMMON_EVENT_SPLIT_SCREEN10+ +## COMMON_EVENT_SPLIT_SCREEN10+ Indicates a screen splitting action. - Value: usual.event.SPLIT_SCREEN diff --git a/en/application-dev/reference/apis/js-apis-system-parameter.md b/en/application-dev/reference/apis/js-apis-system-parameter.md index aab6d05c91..0056acb94e 100644 --- a/en/application-dev/reference/apis/js-apis-system-parameter.md +++ b/en/application-dev/reference/apis/js-apis-system-parameter.md @@ -1,8 +1,8 @@ # @ohos.systemParameter (System Parameter) The **SystemParameter** module provides system services with easy access to key-value pairs. You can use the APIs provided by this module to describe the service status and change the service behavior. The basic operation primitives are get and set. You can obtain the values of system parameters through getters and modify the values through setters. -For details about the system parameter design principles and definitions, see -[Service Management](../../../device-dev/subsystems/subsys-boot-init-sysparam.md). + +For details about the system parameter design principles and definitions, see [Parameter Management](../../../device-dev/subsystems/subsys-boot-init-sysparam.md). > **NOTE** > - The APIs of this module are no longer maintained since API version 9. It is recommended that you use [@ohos.systemParameterEnhance](js-apis-system-parameterEnhance.md) instead. @@ -14,7 +14,7 @@ For details about the system parameter design principles and definitions, see ## Modules to Import ```ts -import systemparameter from '@ohos.systemparameter' +import systemparameter from '@ohos.systemparameter'; ``` ## systemparameter.getSync(deprecated) @@ -30,19 +30,19 @@ Obtains the value of the system parameter with the specified key. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system parameter.| -| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value. | +| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value.| **Return value** | Type| Description| | -------- | -------- | -| string | Value of the system parameter.
If the specified key exists, the set value is returned.
If the specified key does not exist and **def** is set to a valid value, the set value is returned. If the specified key does not exist and **def** is set to an invalid value (such as **undefined**) or is not set, an empty string is returned. | +| string | Value of the system parameter.
If the specified key exists, the set value is returned.
If the specified key does not exist and **def** is set to a valid value, the set value is returned. If the specified key does not exist and **def** is set to an invalid value (such as **undefined**) or is not set, an empty string is returned.| **Example** ```ts try { - var info = systemparameter.getSync("const.ohos.apiversion"); + let info = systemparameter.getSync("const.ohos.apiversion"); console.log(JSON.stringify(info)); } catch(e) { console.log("getSync unexpected error: " + e); @@ -67,8 +67,10 @@ Obtains the value of the system parameter with the specified key. This API uses **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.get("const.ohos.apiversion", function (err, data) { + systemparameter.get("const.ohos.apiversion", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -98,8 +100,10 @@ Obtains the value of the system parameter with the specified key. This API uses **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.get("const.ohos.apiversion", "default", function (err, data) { + systemparameter.get("const.ohos.apiversion", "default", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -124,7 +128,7 @@ Obtains the value of the system parameter with the specified key. This API uses | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system parameter.| -| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value. | +| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value.| **Return value** @@ -135,11 +139,13 @@ Obtains the value of the system parameter with the specified key. This API uses **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - var p = systemparameter.get("const.ohos.apiversion"); - p.then(function (value) { + let p = systemparameter.get("const.ohos.apiversion"); + p.then((value: string) => { console.log("get test.parameter.key success: " + value); - }).catch(function (err) { + }).catch((err: BusinessError) => { console.log("get test.parameter.key error: " + err.code); }); } catch(e) { @@ -200,8 +206,10 @@ Sets a value for the system parameter with the specified key. This API uses an a **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.set("test.parameter.key", "testValue", function (err, data) { + systemparameter.set("test.parameter.key", "testValue", (err: BusinessError, data: void) =>{ if (err == undefined) { console.log("set test.parameter.key value success :" + data) } else { @@ -240,11 +248,13 @@ Sets a value for the system parameter with the specified key. This API uses a pr **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - var p = systemparameter.set("test.parameter.key", "testValue"); - p.then(function (value) { + let p = systemparameter.set("test.parameter.key", "testValue"); + p.then((value: void) => { console.log("set test.parameter.key success: " + value); - }).catch(function (err) { + }).catch((err: BusinessError) => { console.log(" set test.parameter.key error: " + err.code); }); } catch(e) { diff --git a/en/application-dev/reference/apis/js-apis-system-parameterEnhance.md b/en/application-dev/reference/apis/js-apis-system-parameterEnhance.md index dabeb1bad7..fd86ae8f8d 100644 --- a/en/application-dev/reference/apis/js-apis-system-parameterEnhance.md +++ b/en/application-dev/reference/apis/js-apis-system-parameterEnhance.md @@ -1,8 +1,8 @@ # @ohos.systemParameterEnhance (System Parameter) The **SystemParameter** module provides system services with easy access to key-value pairs. You can use the APIs provided by this module to describe the service status and change the service behavior. The basic operation primitives are get and set. You can obtain the values of system parameters through getters and modify the values through setters. -For details about the system parameter design principles and definitions, see -[Service Management](../../../device-dev/subsystems/subsys-boot-init-sysparam.md). + +For details about the system parameter design principles and definitions, see [Parameter Management](../../../device-dev/subsystems/subsys-boot-init-sysparam.md). > **NOTE** > @@ -13,7 +13,7 @@ For details about the system parameter design principles and definitions, see ## Modules to Import ```ts -import systemparameter from '@ohos.systemParameterEnhance' +import systemparameter from '@ohos.systemParameterEnhance'; ``` ## systemparameter.getSync @@ -29,19 +29,19 @@ Obtains the value of the system parameter with the specified key. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system parameter.| -| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value. | +| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value.| **Return value** | Type| Description| | -------- | -------- | -| string | Value of the system parameter.
If the specified key exists, the set value is returned.
If the specified key does not exist and **def** is set to a valid value, the set value is returned. If the specified key does not exist and **def** is set to an invalid value (such as **undefined**) or is not set, an exception is thrown. | +| string | Value of the system parameter.
If the specified key exists, the set value is returned.
If the specified key does not exist and **def** is set to a valid value, the set value is returned. If the specified key does not exist and **def** is set to an invalid value (such as **undefined**) or is not set, an exception is thrown.| **Example** ```ts try { - var info = systemparameter.getSync("const.ohos.apiversion"); + let info = systemparameter.getSync("const.ohos.apiversion"); console.log(JSON.stringify(info)); } catch(e) { console.log("getSync unexpected error: " + e); @@ -66,8 +66,10 @@ Obtains the value of the system parameter with the specified key. **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.get("const.ohos.apiversion", function (err, data) { + systemparameter.get("const.ohos.apiversion", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -97,8 +99,10 @@ Obtains the value of the system parameter with the specified key. This API uses **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.get("const.ohos.apiversion", "default", function (err, data) { + systemparameter.get("const.ohos.apiversion", "default", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -123,7 +127,7 @@ Obtains the value of the system parameter with the specified key. This API uses | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system parameter.| -| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value. | +| def | string | No| Default value of the system parameter.
It works only when the system parameter does not exist.
The value can be **undefined** or any custom value.| **Return value** @@ -134,11 +138,13 @@ Obtains the value of the system parameter with the specified key. This API uses **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - var p = systemparameter.get("const.ohos.apiversion"); - p.then(function (value) { + let p = systemparameter.get("const.ohos.apiversion"); + p.then((value: string) => { console.log("get test.parameter.key success: " + value); - }).catch(function (err) { + }).catch((err: BusinessError) => { console.log("get test.parameter.key error: " + err.code); }); } catch(e) { @@ -164,6 +170,8 @@ Sets a value for the system parameter with the specified key. **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { systemparameter.setSync("test.parameter.key", "default"); } catch(e) { @@ -190,8 +198,10 @@ Sets a value for the system parameter with the specified key. This API uses an a **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - systemparameter.set("test.parameter.key", "testValue", function (err, data) { + systemparameter.set("test.parameter.key", "testValue", (err: BusinessError, data: void) => { if (err == undefined) { console.log("set test.parameter.key value success :" + data) } else { @@ -226,11 +236,13 @@ Sets a value for the system parameter with the specified key. This API uses a pr **Example** ```ts +import { BusinessError } from '@ohos.base'; + try { - var p = systemparameter.set("test.parameter.key", "testValue"); - p.then(function (value) { + let p = systemparameter.set("test.parameter.key", "testValue"); + p.then((value: void) => { console.log("set test.parameter.key success: " + value); - }).catch(function (err) { + }).catch((err: BusinessError) => { console.log(" set test.parameter.key error: " + err.code); }); } catch(e) { diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md b/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md index 0a2bf8673f..a99e4cb206 100644 --- a/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md @@ -306,3 +306,11 @@ pluginComponentManager.request({ } ) ``` + +## cl.arkui.4 Disabling Online Images for JS Widgets in \ + +Disabled online images for JS widgets in the **\**. + +**Change Impact** + + After the change, JS widgets in the **\** cannot load or display online images. You are advised to save online images to the memory to display them in JS widgets. -- GitLab