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

!5147 【OpenHarmony开源贡献者计划2022】[英文]TS API相关格式及表达问题

Merge pull request !5147 from king_he/0608-a
......@@ -4,6 +4,7 @@
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The **<Toggle\>** component can be used to change settings between two states.
## Required Permissions
......
# Web
>![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
>This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The **<Web\>** component can be used to display web pages.
......@@ -42,8 +42,7 @@ None
| onlineImageAccess | boolean | true | Whether to enable access to online images through HTTP and HTTPS. By default, this feature is enabled. |
| zoomAccess | boolean | true | Whether to enable zoom gestures. By default, zoom gestures are enabled. |
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
>
> **NOTE**<br>
> Only the following universal attributes are supported: [width](ts-universal-attributes-size.md#Attributes), [height](ts-universal-attributes-size.md#Attributes), [padding](ts-universal-attributes-size.md#Attributes), [margin](ts-universal-attributes-size.md#Attributes), and [border](ts-universal-attributes-border.md#Attributes).
- <span id="MixedMode">MixedMode</span>
......@@ -85,7 +84,7 @@ Universal events are not supported.
- MessageLevel enums
| Name | Description |
| ----- | :----------------- |
| ----- | ------------------ |
| Debug | Debug level. |
| Error | Error level. |
| Info | Information level. |
......@@ -100,8 +99,8 @@ Represents the result returned to the **\<Web>** component to indicate the opera
| Name | Description |
| --------------------- | ---------------------------------------- |
| handleCancel(): void | <p>Notifies the **\<Web>** component that the user touches the Cancel button in the dialog box.</p> |
| handleConfirm(): void | <p>Notifies the **\<Web>** component that the user touches the Confirm button in the dialog box.</p> |
| handleCancel(): void | <p>Notifies the **\<Web>** component that the user touches the **Cancel** button in the dialog box. |
| handleConfirm(): void | <p>Notifies the **\<Web>** component that the user touches the **Confirm** button in the dialog box. |
### WebResourceError
......@@ -181,7 +180,7 @@ Indicates whether a specific number of steps forward or backward can be performe
| Name | Type | Mandatory | Default Value | Description |
| ---- | ------ | --------- | ------------- | ---------------------------------------- |
| step | number | Yes | - | Number of the steps to take. A positive number means to going forward, and a negative number means to going backward. |
| step | number | Yes | - | Number of the steps to take. A positive number means going forward, and a negative number means going backward. |
- Return value
......@@ -273,7 +272,7 @@ Objects injected through **registerJavaScriptProxy** are still valid on a new pa
onActive(): void
Invoked to instruct the **\<Web>** component to enter the foreground, active state.
Invoked to instruct the **\<Web>** component to enter the active state.
### onInactive
......@@ -312,7 +311,7 @@ Asynchronously executes a JavaScript script. This API uses a callback to return
| Name | Type | Mandatory | Default Value | Description |
| -------- | ------------------------ | --------- | ------------- | ---------------------------------------- |
| script | string | Yes | - | JavaScript script. |
| callback | (result: string) => void | No | - | Callback used to return the result. Returns **null** if the JavaScript script fails to be executed or no value is returned. |
| callback | (result: string) => void | No | - | Callback used to return the result. The value **null** indicates that the JavaScript script fails to be executed or no value is returned. |
### stop
......
# XComponent
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The **\<XComponent>** can accept and display the EGL/OpenGLES and media data input.
......@@ -19,8 +19,8 @@
- Name
| Name | Type | Mandatory| Description |
| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| Name | Type | Mandatory | Description |
| ----------- | --------------------------------------- | --------- | ------------------------------------------------------------ |
| id | string | Yes | Unique ID of the component. The value can contain a maximum of 128 characters. |
| type | string | Yes | Type of the component. The options are as follows:<br>-**surface**: The content of this component is displayed individually, without being combined with that of other components.<br>-**component**: The content of this component is displayed after having been combined with that of other components.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| libraryname | string | No | Name of the dynamic library generated after compilation at the application native layer. |
......@@ -31,8 +31,8 @@
| Name | Description |
| ------------------------------- | ------------------------ |
| onLoad(context?: object) => void | Triggered when the plug-in is loaded.|
| onDestroy() => void | Triggered when the plug-in is destroyed.|
| onLoad(context?: object) => void | Triggered when the plug-in is loaded. |
| onDestroy() => void | Triggered when the plug-in is destroyed. |
## XComponentController
......@@ -54,7 +54,7 @@ Obtains the ID of the surface held by the **\<XComponent>**. The ID can be used
| Type | Description |
| ------ | --------------------------- |
| string | ID of the surface held by the **\<XComponent>**.|
| string | ID of the surface held by the **\<XComponent>**. |
### setXComponentSurfaceSize
......@@ -64,10 +64,10 @@ Sets the width and height of the surface held by the **\<XComponent>**.
- Parameters
| Name | Type| Mandatory| Default Value| Description |
| Name | Type | Mandatory | Default Value | Description |
| ------------- | -------- | ---- | ------ | ----------------------------- |
| surfaceWidth | number | Yes | - | Width of the surface held by the **\<XComponent>**.|
| surfaceHeight | number | Yes | - | Height of the surface held by the **\<XComponent>**.|
| surfaceWidth | number | Yes | - | Width of the surface held by the **\<XComponent>**. |
| surfaceHeight | number | Yes | - | Height of the surface held by the **\<XComponent>**. |
### getXComponentContext
......
# LongPressGesture
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This gesture is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions
None
......
# PanGesture
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> This gesture is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions
None
......@@ -17,7 +15,7 @@ PanGesture(options?: { fingers?: number, direction?: PanDirection, distance?: nu
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| fingers | number | No | 1 | Minimum number of fingers to trigger a long press gesture. The value ranges from 1 to 10. |
| fingers | number | No | 1 | Minimum number of fingers to trigger a slide gesture. The value ranges from 1 to 10. |
| direction | PanDirection | No | All | Slide direction. The enumerated value supports the AND (&amp;) and OR (\|) operations. |
| distance | number | No | 5.0 | Minimum slide recognition distance, in vp. |
......
# PinchGesture
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This gesture is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
......
# RotationGesture
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This gesture is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
......
# SwipeGesture
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> **NOTE**<br>
> This gesture is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册