From 2e28f74761a468663b5d9a51a937fe9dc46a7b08 Mon Sep 17 00:00:00 2001
From: king_he <6384784@qq.com>
Date: Tue, 31 May 2022 01:02:44 +0000
Subject: [PATCH] update
en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md.
Signed-off-by: king_he <6384784@qq.com>
---
.../ts-basic-components-plugincomponent.md | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md b/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md
index 71a8900fb6..7042bd3ba8 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md
@@ -1,7 +1,7 @@
# PluginComponent
-> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> - This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
>
> - The APIs of this module are system APIs and cannot be called by third-party applications.
@@ -27,12 +27,12 @@ PluginComponent(value: { template: PluginComponentTemplate, data: any })
Creates a **PluginComponent** to display the UI provided by an external application.
- Parameters
- | Name | Type | Mandatory | Default Value | Description |
+ | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| value | {
template: PluginComponentTemplate,
data: KVObject
} | Yes | - | **template**: template of the **PluginComponent**, which is bound to the component defined by the provider.
**data**: data passed to the **PluginComponent** provider. |
- PluginComponentTemplate parameters
- | Name | Type | Description |
+ | Name | Type | Description |
| -------- | -------- | -------- |
| source | string | Component template name. |
| ability | string | Name of the provider ability. |
@@ -40,7 +40,7 @@ Creates a **PluginComponent** to display the UI provided by an external applicat
## Events
- | Name | Description |
+| Name | Description |
| -------- | -------- |
| onComplete(callback: () => void) | Triggered when the component loading is complete. |
| onError(callback: (info: { errcode: number, msg: string }) => void) | Triggered when an error occurs during component loading.
**errcode**: error code.
**msg**: error information. |
@@ -72,20 +72,20 @@ Used by the component provider to send the component and data to the component c
- Parameters
- | Name | Type | Mandatory | Description |
+ | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| param | PushParameters | Yes | Information about the component consumer. For details, see description of PushParameters. |
| callback | AsyncCallback<void> | Yes | Asynchronous callback used to return the result. |
- Description of PushParameters
- | Name | Type | Mandatory | Description |
+ | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| want | Want | Yes | Ability information of the component consumer. |
| name | string | Yes | Component name. |
| data | KVObject | No | Component data value. |
| extraData | KVObject | No | Additional data value. |
-- Example
+- Example
For details, see [APIs Called by Component Consumers](#apis-called-by-component-consumers).
@@ -96,32 +96,32 @@ request(param: RequestParameters, callback: AsyncCallback<RequestCallbackPara
Used by the component consumer to request the component from the component provider.
- Parameters
- | Name | Type | Mandatory | Description |
+ | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| param | RequestParameters | Yes | Information about the component request. For details, see description of RequestParameters. |
| callback | AsyncCallback
For details, see [APIs Called by Component Consumers](#apis-called-by-component-consumers).
@@ -132,25 +132,25 @@ on(eventType: string, callback: OnPushEventCallback | OnRequestEventCallback): v
Listens for events of the request type and returns the requested data, or listens for events of the push type and receives the data pushed by the provider.
- Parameters
- | Name | Type | Mandatory | Description |
+ | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| eventType | string | Yes | Type of the event to listen for. The options are **"push"** and **"request"**.
**"push"**: The component provider pushes data to the component consumer.
**"request"**: The component consumer proactively requests data from the component provider. |
| callback | OnPushEventCallback \| OnRequestEventCallback | Yes | Callback used to return the result. For details, see description of callback. |
- Description of callback
- | Name | Type | Description |
+ | Name | Type | Description |
| -------- | -------- | -------- |
| OnRequestEventCallback | (source: Want,
name: string,
data: KVObject ) =>RequestEventResult | Callback for the data request event.
**source**: ability information of the component requester.
**name**: name of the requested component.
**data**: additional data.
Return value: request data and result. |
| OnPushEventCallback | (source: Want,
template: PluginComponentTemplate,
data: KVObject,
extraData: KVObject
) => void | Callback used to receive the data pushed by the component provider.
**source**: ability information of the component provider.
**template**: component template.
**data**: component update data.
**extraData**: additional data. |
- Description of RequestEventResult
- | Name | Type | Description |
+ | Name | Type | Description |
| -------- | -------- | -------- |
| template | string | Component name. |
| data | KVObject | Component data. |
| extraData | KVObject | Additional data. |
-- Example
+- Example
For details, see [APIs Called by Component Consumers](#apis-called-by-component-consumers).
--
GitLab