未验证 提交 7d53a7a4 编写于 作者: O openharmony_ci 提交者: Gitee

!8685 翻译完成 8578:arkui-ts/ts-container-ability-component.md

Merge pull request !8685 from ester.zhou/TR-8578
......@@ -4,35 +4,19 @@
> **NOTE**
>
> This component is supported since API version 9.
> This component is supported since API version 9. 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.
## Constraints
Using **\<AbilityComponent>** requires a signature and related permissions.
**\<AbilityComponent>** is rendered independently and cannot be overlaid with other display content.
**\<AbilityComponent>** cannot process input events. Events are directly distributed to the internal ability for processing without passing through the current ability.
Only width and height can be set for **\<AbilityComponent>**. These attributes are mandatory and cannot be dynamically updated.
The ability to be started must be resizeable.
The ability to start must be set not to display on the recent tasks screen.
## Required Permissions
ohos.permission.INFUSE_EVENTS
ohos.permission.CONTROL_ABILITY_STACKS
ohos.permission.INTEGRATED_ABILITY
ohos.permission.INTEGRATED_INTERIOR_WINDOW
The ability to be started must inherit from [WindowExtension](../apis/js-apis-application-WindowExtensionAbility.md).
## Child Components
......@@ -43,19 +27,26 @@ Not supported
AbilityComponent(value: {want : Want})
- Parameters
| Name| Type| Mandatory| Default Value| Description|
| -------- | -------- | -------- | -------- | -------- |
| want | [Want](../../reference/apis/js-apis-application-Want.md) | Yes| - | Description of the default ability to load.|
**Parameters**
| Name| Type| Mandatory| Default Value| Description|
| -------- | -------- | -------- | -------- | -------- |
| want | [Want](../../reference/apis/js-apis-application-Want.md) | Yes| - | Description of the default ability to load.|
## Events
| Name| Description|
| -------- | -------- |
| onConnect()&nbsp;=&gt;&nbsp;void | Called when this **\<AbilityComponent>** is started. You can then use APIs in the **\<AbilityComponent>**.|
| onDisconnect()&nbsp;=&gt;&nbsp;void | Called when this **\<AbilityComponent>** is destroyed.|
### onConnect
onConnect()&nbsp;=&gt;&nbsp;void
Called when this **\<AbilityComponent>** is started. You can then use APIs in the **\<AbilityComponent>**.
### onDisconnect
onDisconnect()&nbsp;=&gt;&nbsp;void
Called when this **\<AbilityComponent>** is destroyed.
## Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册