提交 e4c5b0ad 编写于 作者: E ester.zhou

Update docs (18106)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 30142c76
# @ohos.enterprise.dateTimeManager
# @ohos.enterprise.dateTimeManager (System Time Management)
The **dateTimeManager** module provides APIs for system time management, which can only be called by device administrator applications.
The **dateTimeManager** module provides APIs for system time management. Only the enterprise device administrator applications can call the APIs provided by this module.
> **NOTE**
>
......@@ -16,7 +16,7 @@ import dateTimeManager from '@ohos.enterprise.dateTimeManager'
setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void
Sets the system time. This API uses an asynchronous callback to return the result.
Configures a device administrator application to set the system time. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -30,11 +30,11 @@ Sets the system time. This API uses an asynchronous callback to return the resul
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| time | number | Yes| Timestamp (ms).|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the setting is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the following error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
......@@ -59,7 +59,7 @@ dateTimeManager.setDateTime(wantTemp, 1526003846000, (error) => {
setDateTime(admin: Want, time: number): Promise\<void>
Sets the system time. This API uses a promise to return the result.
Configures a device administrator application to set the system time. This API uses a promise to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -82,7 +82,7 @@ Sets the system time. This API uses a promise to return the result.
**Error codes**
For details about the following error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
......
......@@ -55,8 +55,8 @@ Sets the parameters to be passed in the **PluginManager.Push** API in the FA mod
| --------- | ----------------------------------- | ---- | -------------------------------------------------------------- |
| want | [Want](js-apis-application-want.md) | Yes | Ability information of the component user. |
| name | string | Yes | Component name. |
| data | [KVObject](#kvobject) | No | Component data value. |
| extraData | [KVObject](#kvobject) | No | Additional data value. |
| data | [KVObject](#kvobject) | Yes | Component data value. |
| extraData | [KVObject](#kvobject) | Yes | Additional data value. |
| jsonPath | string | No | Path to the [external.json](#about-the-externaljson-file) file that stores the template path.|
### PushParameterForStage
......@@ -74,8 +74,8 @@ Sets the parameters to be passed in the **PluginManager.Push** API in the stage
| owner | [Want](js-apis-application-want.md) | Yes | Ability information of the component provider. |
| target | [Want](js-apis-application-want.md) | Yes | Ability information of the component user. |
| name | string | Yes | Component name. |
| data | [KVObject](#kvobject) | No | Component data value. |
| extraData | [KVObject](#kvobject) | No | Additional data value. |
| data | [KVObject](#kvobject) | Yes | Component data value. |
| extraData | [KVObject](#kvobject) | Yes | Additional data value. |
| jsonPath | string | No | Path to the [external.json](#about-the-externaljson-file) file that stores the template path.|
### RequestParameters
......@@ -117,11 +117,11 @@ Provides the result returned after the **PluginManager.Request** API is called.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Mandatory| Description |
| ----------------- | ---------------------------------------------------- | ---- | ---------- |
| componentTemplate | [PluginComponentTemplate](#plugincomponenttemplate)] | Yes | Component template.|
| data | [KVObject](#kvobject) | Yes | Component data.|
| extraData | [KVObject](#kvobject) | Yes | Additional data.|
| Name | Type | Mandatory| Description |
| ----------------- | --------------------------------------------------- | ---- | ---------- |
| componentTemplate | [PluginComponentTemplate](#plugincomponenttemplate) | Yes | Component template.|
| data | [KVObject](#kvobject) | Yes | Component data.|
| extraData | [KVObject](#kvobject) | Yes | Additional data.|
### RequestEventResult
......@@ -175,7 +175,7 @@ Registers the listener for the request event.
| Name | Type | Mandatory| Description |
| --------- | ----------------------------------- | ---- | --------------------------- |
| source | [Want](js-apis-application-want.md) | Yes | Information about the request sender.|
| data | [KVObject](#kvobject) | Yes | Data. |
| name | string | Yes | Template name. |
| extraData | [KVObject](#kvobject) | Yes | Additional data. |
**Example**
......
......@@ -5,7 +5,7 @@ The **\<PluginComponent>** allows the UI provided by an external application to
> **NOTE**
>
> - This component is supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
> This component is supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
......@@ -30,10 +30,21 @@ Creates a **PluginComponent** to display the UI provided by an external applicat
| ---------- | ------ | --------------------------- |
| source | string | Component template name. |
| bundleName | string | Bundle name of the provider ability.|
## Attributes
The [universal attributes](ts-universal-attributes-size.md) are supported, and **size** must be set.
**NOTE**
The template can be provided in either of the following modes:
* Use an absolute path. In this case, set **source** to the absolute path of the template and leave **bundleName** blank. This mode is not recommende as it is applicable only to standalone templates that do not need to load resources.
* Use an application package. In this case, set **bundleName** to the application bundle name and **source** to the relative path of the HAP file template.
Example: **{source: 'ets/pages/plugin.js', bundleName: 'com.example.provider'}**
The template is provided only when **source** can be set to an ability name in the FA model.
Example: **{source: 'plugin', bundleName: 'com.example.provider'}**
The universal attribute [size](ts-universal-attributes-size.md) is supported and must be set.
## Events
......
......@@ -124,8 +124,8 @@ The **ResourceColor** type is used to describe the color types of resources.
| Type | Description |
| ---------------------------------------- | ------------------------------------------------- |
| [Color](ts-appendix-enums.md#color) | Color enums. |
| number | Color in hexadecimal notation. RGB is supported. |
| string | Color in RGB or RGBA notation. |
| number | Color in hexadecimal notation. RGB is supported. Example: **0xffffff** |
| string | Color in RGB or RGBA notation. Example: **'#ffffff', '#ff000000', 'rgb(255, 100, 255)', 'rgba(255, 100, 255, 0.5)'** |
| [Resource](#resource) | Color referenced from system or application resources.|
## LengthConstrain
......@@ -207,7 +207,7 @@ The **ColorFilter** type is used to create a color filter with a 4 x 5 matrix.
| Name | Type | Mandatory | Description |
| ----------- | -------- | ---- | ---------------------------------------- |
| constructor | number[] | Yes | Constructor for creating a color filter with a 4 x 5 matrix. The input parameter is [m*n], which is the matrix value in row m and column n. The matrix is row-first.|
| constructor | number[] | Yes | Constructor for creating a color filter with a 4 x 5 matrix. The input parameter is [m*n], which is the matrix value in row m and column n. The value range is [0, 1]. The matrix is row-first.|
## CustomBuilder<sup>8+</sup>
......@@ -216,5 +216,5 @@ The **CustomBuilder** type is used to define custom UI descriptions in component
| Name | Type | Description |
| ------------- | ---------------------- | ---------------------------------------- |
| CustomBuilder | () =&gt; any | Must be decorated by **@Builder**. For details, see [@Builder](../../quick-start/arkts-dynamic-ui-elememt-building.md#builder).|
| CustomBuilder | () =&gt; any | Must be decorated by **@Builder**. For details, see [@Builder](../../quick-start/arkts-builder.md).|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册