,
controller: WebController
} | - | JavaScript object to be injected into the window. Methods of this object can be invoked in the window. The parameters in this attribute cannot be updated.
**object** indicates the object to be registered. Methods can be declared, but not attributes. The parameters and return value can only be of the string, number, or Boolean type.
**name** indicates the name of the object to be registered, which is the same as that invoked in the window. After registration, the window can use this name to access the JavaScript object at the application side.
**methodList** indicates the methods of the JavaScript object to be registered at the application side.
**controller** indicates the controller. |
+| javaScriptAccess | boolean | true | Whether JavaScript scripts can be executed. By default, JavaScript scripts can be executed. |
+| mixedMode | [MixedMode](#mixedmode) | MixedMode.None | Whether to enable loading of HTTP and HTTPS hybrid content can be loaded. By default, this feature is disabled. |
+| 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. |
+| overviewModeAccess | boolean | true | Whether to use the overview mode to load web pages. By default, this mode is used. |
+| databaseAccess | boolean | false | Whether to enable database access. By default, this feature is disabled. |
+| cacheMode | [CacheMode](#cachemode) | CacheMode.Default | Cache mode. |
+| textZoomAtio | number | 100 | Text zoom ratio of the page. The default value is **100**, which indicates 100%. |
+| userAgent | string | - | User agent. |
> **NOTE**
>
@@ -56,8 +56,8 @@ Not supported
The universal events are not supported.
-| Name | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
| onAlert(callback: (event?: { url: string; message: string; result: [JsResult](#jsresult) }) => boolean) | Triggered when **alert()** is invoked to display an alert dialog box on the web page.
If the callback returns **false**, the default dialog box is displayed. If the callback returns **true**, a system application can use the system dialog box (allows only the confirm operation) and invoke the **JsResult** API to notify the **\** component of the user's operation.
**url**: URL of the web page where the dialog box is displayed.
**message**: information displayed in the dialog box.
**JsResult**: the user's operation.
|
| onBeforeUnload(callback: (event?: { url: string; message: string; result: [JsResult](#jsresult) }) => boolean) | Triggered when the current page is about to exit after the user refreshes or closes the page.
If the callback returns **false**, the default dialog box is displayed. If the callback returns **true**, a system application can use the system dialog box (allows the confirm and cancel operations) and invoke the **JsResult** API to notify the **\** component of the user's operation.
**url**: URL of the web page where the dialog box is displayed.
**message**: information displayed in the dialog box.
**JsResult**: the user's operation.
|
| onConfirm(callback: (event?: { url: string; message: string; result: [JsResult](#jsresult) }) => boolean) | Triggered when **confirm()** is invoked by the web page.
If the callback returns **false**, the default dialog box is displayed. If the callback returns **true**, a system application can use the system dialog box (allows the confirm and cancel operations) and invoke the **JsResult** API to notify the **\** component of the user's operation.
**url**: URL of the web page where the dialog box is displayed.
**message**: information displayed in the dialog box.
**JsResult**: the user's operation.
|
@@ -65,8 +65,8 @@ The universal events are not supported.
| onDownloadStart(callback: (event?: { url: string, userAgent: string, contentDisposition: string, mimetype: string, contentLength: number }) => void) | Triggered when a download task starts on the web page.
**url**: URL for the download task.
**userAgent**: name of the user agent (UA) for the download task.
**contentDisposition**: Content-Disposition response header returned by the server, which may be empty.
**mimetype**: content media type (MIME) returned by the server.
**contentLength**: length of the file returned by the server.
|
| onErrorReceive(callback: (event?: { request: [WebResourceRequest](#webresourceerror), error: [WebResourceError](#webresourceerror) }) => void) | Triggered when an error occurs during web page loading.
For better results, simplify the implementation logic in the callback.
**request**: encapsulation of a web page request.
**error**: encapsulation of a web page resource loading error.
|
| onHttpErrorReceive(callback: (event?: { request: [WebResourceRequest](#webresourceerror), response: [WebResourceResponse](#webresourceresponse) }) => void) | Triggered when an HTTP error (the response code is greater than or equal to 400) occurs during web page resource loading.
**request**: encapsulation of a web page request.
**response**: encapsulation of a web page response.
|
-| onPageBegin(callback: (event?: { url: string }) => void) | Triggered when the web page starts to be loaded. This API is triggered only for the main frame content, and not for the iframe or frameset content.
**url**: URL of the page.
|
-| onPageEnd(callback: (event?: { url: string }) => void) | Triggered when the web page loading is complete. This API is triggered only for the main frame content.
**url**: URL of the page.
|
+| onPageBegin(callback: (event?: { url: string }) => void) | Triggered when the web page starts to be loaded. This API is triggered only for the main frame content, and not for the iframe or frameset content.
**url**: URL of the page.
|
+| onPageEnd(callback: (event?: { url: string }) => void) | Triggered when the web page loading is complete. This API is triggered only for the main frame content.
**url**: URL of the page.
|
| onProgressChange(callback: (event?: { newProgress: number }) => void) | Triggered when the web page loading progress changes.
**newProgress**: new loading progress. The value is an integer ranging from 0 to 100.
|
| onTitleReceive(callback: (event?: { title: string }) => void) | Triggered when the document title of the web page is changed.
**title**: document title.
|
| onRefreshAccessedHistory(callback: (event?: { url: string, isRefreshed: boolean }) => void) | Triggered when loading of the web page is complete. This callback function is used by an application to update the historical link it accessed.
**url**: URL to be accessed.
**isRefreshed**: whether the page is reloaded. The value **true** means that the page is reloaded, and **false** means that the page is newly loaded.
|
@@ -76,120 +76,120 @@ The universal events are not supported.
## ConsoleMessage
-| Name | Description |
-| ------------------------------- | ---------------------- |
-| getLineNumber(): number | Obtains the number of rows in the **ConsoleMessage**. |
-| getMessage(): string | Obtains the log information of the **ConsoleMessage**.|
-| getMessageLevel(): [MessageLevel](#messagelevel-enums) | Obtains the log information level of the **ConsoleMessage**.|
-| getSourceId(): string | Obtains the path and name of the web page source file. |
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| getLineNumber(): number | Obtains the number of rows in the **ConsoleMessage**. |
+| getMessage(): string | Obtains the log information of the **ConsoleMessage**. |
+| getMessageLevel(): [MessageLevel](#messagelevel-enums) | Obtains the log information level of the **ConsoleMessage**. |
+| getSourceId(): string | Obtains the path and name of the web page source file. |
## MessageLevel Enums
-| Name | Description |
-| ----- | :---- |
-| Debug | Debug level.|
-| Error | Error level.|
-| Info | Information level.|
-| Log | Log level.|
-| Warn | Warning level. |
+| Name | Description |
+| ----- | :----------------- |
+| Debug | Debug level. |
+| Error | Error level. |
+| Info | Information level. |
+| Log | Log level. |
+| Warn | Warning level. |
## JsResult
Provides the result returned to the **\** component to indicate the user operation performed in the dialog box.
-| Name | Description |
-| --------------------- | ----------------------- |
+| Name | Description |
+| --------------------- | ---------------------------------------- |
| handleCancel(): void | The user's cancel operation in the dialog box.
|
| handleConfirm(): void | The user's confirm operation in the dialog box.
|
## WebResourceError
-| Name | Description |
-| ---------------------- | ------------ |
+| Name | Description |
+| ---------------------- | ---------------------------------------- |
| getErrorCode(): number | Obtains the error code for resource loading. |
-| getErrorInfo(): string | Obtains error information about resource loading.|
+| getErrorInfo(): string | Obtains error information about resource loading. |
## WebResourceRequest
-| Name | Description |
-| ---------------------------------------- | -------------------- |
-| getRequestHeader(): Array\<[Header](#header)\> | Obtains the information about the resource request header. |
-| getRequestUrl(): string | Obtains the URL of the resource request. |
-| isMainFrame(): boolean | Checks whether the resource request is in the main frame. |
-| isRedirect(): boolean | Checks whether the resource request is redirected by the server. |
-| isRequestGesture(): boolean | Checks whether the resource request is associated with a gesture (for example, a tap).|
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| getRequestHeader(): Array\<[Header](#header)\> | Obtains the information about the resource request header. |
+| getRequestUrl(): string | Obtains the URL of the resource request. |
+| isMainFrame(): boolean | Checks whether the resource request is in the main frame. |
+| isRedirect(): boolean | Checks whether the resource request is redirected by the server. |
+| isRequestGesture(): boolean | Checks whether the resource request is associated with a gesture (for example, a tap). |
## Header
Describes the request/response header returned by the **\** component.
-| Name | Type | Description |
-| ----------- | ------ | ------------- |
-| headerKey | string | Key of the request/response header. |
-| headerValue | string | Value of the request/response header.|
+| Name | Type | Description |
+| ----------- | ------ | ------------------------------------- |
+| headerKey | string | Key of the request/response header. |
+| headerValue | string | Value of the request/response header. |
## WebResourceResponse
-| Name | Description |
-| ---------------------------------------- | ------------------ |
-| getReasonMessage(): string | Obtains the status code description of the resource response. |
-| getResponseCode(): number | Obtains the status code of the resource response. |
-| getResponseData(): string | Obtains the data in the resource response. |
-| getResponseEncoding(): string | Obtains the encoding of the resource response. |
-| getResponseHeader(): Array\<[Header](#header)\> | Obtains the resource response header. |
-| getResponseMimeType(): string | Obtains the media (MIME) type of the resource response.|
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| getReasonMessage(): string | Obtains the status code description of the resource response. |
+| getResponseCode(): number | Obtains the status code of the resource response. |
+| getResponseData(): string | Obtains the data in the resource response. |
+| getResponseEncoding(): string | Obtains the encoding of the resource response. |
+| getResponseHeader(): Array\<[Header](#header)\> | Obtains the resource response header. |
+| getResponseMimeType(): string | Obtains the media (MIME) type of the resource response. |
## RenderExitReason
Explains why the rendering process exits.
-| Name | Description |
-| -------------------------- | ----------------- |
-| PROCESS_ABNORMAL_TERMINATION | The rendering process exits abnormally. |
-| PROCESS_WAS_KILLED | The rendering process receives a SIGKILL message or is manually terminated.|
-| PROCESS_CRASHED | The rendering process crashes due to a segmentation error or other errors. |
-| PROCESS_OOM | The program memory is running low. |
-| PROCESS_EXIT_UNKNOWN | Other reason. |
+| Name | Description |
+| ---------------------------- | ---------------------------------------- |
+| PROCESS_ABNORMAL_TERMINATION | The rendering process exits abnormally. |
+| PROCESS_WAS_KILLED | The rendering process receives a SIGKILL message or is manually terminated. |
+| PROCESS_CRASHED | The rendering process crashes due to a segmentation error or other errors. |
+| PROCESS_OOM | The program memory is running low. |
+| PROCESS_EXIT_UNKNOWN | Other reason. |
## MixedMode
-| Name | Description |
-| ---------- | ---------------------------------- |
-| All | HTTP and HTTPS hybrid content can be loaded. This means that all insecure content can be loaded.|
-| Compatible | HTTP and HTTPS hybrid content can be loaded in compatibility mode. This means that some insecure content may be loaded. |
-| None | HTTP and HTTPS hybrid content cannot be loaded. |
+| Name | Description |
+| ---------- | ---------------------------------------- |
+| All | HTTP and HTTPS hybrid content can be loaded. This means that all insecure content can be loaded. |
+| Compatible | HTTP and HTTPS hybrid content can be loaded in compatibility mode. This means that some insecure content may be loaded. |
+| None | HTTP and HTTPS hybrid content cannot be loaded. |
## CacheMode
-| Name | Description |
-| ------- | ------------------------------------ |
-| Default | The cache that has not expired is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet.|
-| None | The cache is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet. |
-| Online | The cache is not used to load the resources. All resources are obtained from the Internet. |
-| Only | The cache alone is used to load the resources. |
+| Name | Description |
+| ------- | ---------------------------------------- |
+| Default | The cache that has not expired is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet. |
+| None | The cache is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet. |
+| Online | The cache is not used to load the resources. All resources are obtained from the Internet. |
+| Only | The cache alone is used to load the resources. |
## FileSelectorResult
Notifies the **\** component of the file selection result.
-| Name | Description |
-| ---------------------------------------------- | ------------------------------------------------------------ |
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
| handleFileList(fileList: Array\): void | Instructs the **\** component to select a file.
**fileList**: list of files to operate. |
## FileSelectorParam
-| Name | Description |
-| -------------------------------- | ------------ |
-| title(): string | Title of the file selector. |
-| mode(): FileSelectorMode | Mode of the file selector. |
-| acceptType(): Array\ | File filtering type. |
-| isCapture(): boolean | Whether multimedia capabilities are invoked.|
+| Name | Description |
+| ----------------------------- | ---------------------------------------- |
+| title(): string | Title of the file selector. |
+| mode(): FileSelectorMode | Mode of the file selector. |
+| acceptType(): Array\ | File filtering type. |
+| isCapture(): boolean | Whether multimedia capabilities are invoked. |
## FileSelectorMode
-| Name | Description |
-| -------------------- | ---------- |
-| FILE_OPEN_MODE | Open and upload a file. |
+| Name | Description |
+| ----------------------- | ------------------------------- |
+| FILE_OPEN_MODE | Open and upload a file. |
| FILE_OPEN_MULTIPLE_MODE | Open and upload multiple files. |
-| FILE_OPEN_FOLDER_MODE | Open and upload a folder.|
-| FILE_SAVE_MODE | Save a file. |
+| FILE_OPEN_FOLDER_MODE | Open and upload a folder. |
+| FILE_SAVE_MODE | Save a file. |
## WebController
@@ -221,15 +221,15 @@ Indicates whether a specific number of steps forward or backward can be performe
- Parameters
- | 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.|
+ | 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. |
- Return value
- | Type | Description |
- | ------- | --------- |
- | boolean | Whether to go forward or backward from the current page.|
+ | Type | Description |
+ | ------- | ---------------------------------------- |
+ | boolean | Whether to go forward or backward from the current page. |
### backward
@@ -245,9 +245,9 @@ Deletes a specific application JavaScript object that is registered with the win
- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | ---- | ------ | ---- | ---- | ---------------------------------------- |
- | name | string | Yes | - | Name of the registered JavaScript object, which can be used to invoke the corresponding object on the application side from the web side.|
+ | Name | Type | Mandatory | Default Value | Description |
+ | ---- | ------ | --------- | ------------- | ---------------------------------------- |
+ | name | string | Yes | - | Name of the registered JavaScript object, which can be used to invoke the corresponding object on the application side from the web side. |
### forward
@@ -263,15 +263,15 @@ Obtains the element type of the area being clicked.
- HitTestType enums
- | Name | Description |
- | ------------- | ------------------------ |
- | EditText | Editable area. |
- | Email | Email address. |
- | HttpAnchor | Hyperlink where **src** is **http**. |
- | HttpAnchorImg | Image with a hyperlink, where **src** is **http**.|
- | Img | HTML::img tag. |
- | Map | Geographical address. |
- | Unknown | Unknown content. |
+ | Name | Description |
+ | ------------- | ---------------------------------------- |
+ | EditText | Editable area. |
+ | Email | Email address. |
+ | HttpAnchor | Hyperlink where **src** is **http**. |
+ | HttpAnchorImg | Image with a hyperlink, where **src** is **http**. |
+ | Img | HTML::img tag. |
+ | Map | Geographical address. |
+ | Unknown | Unknown content. |
### loadData
@@ -285,13 +285,13 @@ If **baseUrl** is set to an HTTP or HTTPS URL, the encoded string will be proces
- options
- | Name | Type | Mandatory | Default Value | Description |
- | ---------- | ------ | ---- | ---- | ---------------------------------------- |
- | data | string | Yes | - | Character string obtained after being Base64 or URL encoded. |
- | mimeType | string | Yes | - | Media type (MIME). |
- | encoding | string | Yes | - | Encoding type, which can be Base64 or URL. |
- | baseUrl | string | No | - | URL (HTTP/HTTPS/data compliant), which is assigned by the **\** component to **window.origin**.|
- | historyUrl | string | No | - | Historical record URL. If this parameter is not empty, it can be managed in historical records to implement page going backward and forward. This parameter is invalid when **baseUrl** is left empty.|
+ | Name | Type | Mandatory | Default Value | Description |
+ | ---------- | ------ | --------- | ------------- | ---------------------------------------- |
+ | data | string | Yes | - | Character string obtained after being Base64 or URL encoded. |
+ | mimeType | string | Yes | - | Media type (MIME). |
+ | encoding | string | Yes | - | Encoding type, which can be Base64 or URL. |
+ | baseUrl | string | No | - | URL (HTTP/HTTPS/data compliant), which is assigned by the **\** component to **window.origin**. |
+ | historyUrl | string | No | - | Historical record URL. If this parameter is not empty, it can be managed in historical records to implement page going backward and forward. This parameter is invalid when **baseUrl** is left empty. |
### loadUrl
@@ -305,10 +305,10 @@ The object injected through **registerJavaScriptProxy** is still valid on a new
- options
- | Name | Type | Mandatory | Default Value | Description |
- | ------- | ------------------------------ | ---- | ---- | -------------- |
- | url | string | Yes | - | URL to load. |
- | headers | Array\<[Header](#header)\> | No | [] | Additional HTTP request header of the URL.|
+ | Name | Type | Mandatory | Default Value | Description |
+ | ------- | -------------------------- | --------- | ------------- | ---------------------------------------- |
+ | url | string | Yes | - | URL to load. |
+ | headers | Array\<[Header](#header)\> | No | [] | Additional HTTP request header of the URL. |
### onActive
@@ -336,11 +336,11 @@ Injects a JavaScript object into the window and invokes the methods of the objec
- options
- | Name | Type | Mandatory | Default Value | Description |
- | ---------- | --------------- | ---- | ---- | ---------------------------------------- |
- | object | object | Yes | - | Application-side JavaScript object to be registered. Methods can be declared, but not attributes. The parameters and return value can only be of the string, number, or Boolean type.|
- | name | string | Yes | - | Name of the object to be registered, which is the same as that invoked in the window. After registration, the window can use this name to access the JavaScript object at the application side.|
- | methodList | Array\ | Yes | - | Methods of the JavaScript object to be registered at the application side. |
+ | Name | Type | Mandatory | Default Value | Description |
+ | ---------- | --------------- | --------- | ------------- | ---------------------------------------- |
+ | object | object | Yes | - | Application-side JavaScript object to be registered. Methods can be declared, but not attributes. The parameters and return value can only be of the string, number, or Boolean type. |
+ | name | string | Yes | - | Name of the object to be registered, which is the same as that invoked in the window. After registration, the window can use this name to access the JavaScript object at the application side. |
+ | methodList | Array\ | Yes | - | Methods of the JavaScript object to be registered at the application side. |
### runJavaScript
@@ -350,10 +350,10 @@ Asynchronously executes a JavaScript script. This API uses a callback to return
- options
- | 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.|
+ | 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. |
### stop
@@ -373,9 +373,9 @@ getCookieManager(): WebCookie
Obtains the cookie management object of the **\** component.
- Return value
- | Type | Description |
+ | Type | Description |
| --------- | ---------------------------------------- |
- | WebCookie | Cookie management object. For details, see [WebCookie](#webcookie).|
+ | WebCookie | Cookie management object. For details, see [WebCookie](#webcookie). |
## WebCookie
Manages behavior of cookies in **\** components. All **\** components in an application share a **WebCookie**. You can use the **getCookieManager** API in **controller** to obtain the **WebCookie** for subsequent cookie management.
### setCookie
@@ -385,23 +385,23 @@ Sets the cookie. This API is synchronous.
- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | ----- | ------ | ---- | ---- | ----------------- |
- | url | string | Yes | - | URL of the cookie to set.|
- | value | string | Yes | - | Value of the cookie to set. |
+ | Name | Type | Mandatory | Default Value | Description |
+ | ----- | ------ | --------- | ------------- | --------------------------- |
+ | url | string | Yes | - | URL of the cookie to set. |
+ | value | string | Yes | - | Value of the cookie to set. |
- Return value
- | Type | Description |
- | ------- | ------------- |
- | boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
+ | Type | Description |
+ | ------- | ---------------------------------------- |
+ | boolean | Returns **true** if the operation is successful; returns **false** otherwise. |
### saveCookieSync
saveCookieSync(): boolean
Saves this cookie in the memory to the disk. This API is synchronous.
- Return value
- | Type | Description |
- | ------- | -------------------- |
- | boolean | Returns the operation result.|
+ | Type | Description |
+ | ------- | ----------------------------- |
+ | boolean | Returns the operation result. |
## Example
```ts
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md b/en/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md
index 826be4134f929eadfeef3627f83e38dd71639095..709ea8739ba7628a3a6e0df6157a115f561de298 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md
@@ -15,24 +15,24 @@ PanGesture(value?: { fingers?: number, direction?: PanDirection, distance?: numb
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| fingers | number | No| Minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10.
Default value: **1**|
-| direction | PanDirection | No| Pan direction. The enumerated value supports the AND (&) and OR (\|) operations.
Default value: **PanDirection.All**|
-| distance | number | No| Minimum pan distance to trigger the gesture, in vp.
Default value: **5**
**NOTE**
If a pan gesture and tab swipe occur at the same time, set **distance** to **1** so that the gesture can be more easily recognized.|
+| Name | Type | Mandatory | Description |
+| --------- | ------------ | --------- | ---------------------------------------- |
+| fingers | number | No | Minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10.
Default value: **1** |
+| direction | PanDirection | No | Pan direction. The enumerated value supports the AND (&) and OR (\|) operations.
Default value: **PanDirection.All** |
+| distance | number | No | Minimum pan distance to trigger the gesture, in vp.
Default value: **5**
**NOTE**
If a pan gesture and tab swipe occur at the same time, set **distance** to **1** so that the gesture can be more easily recognized. |
## PanDirection enums
-| Name| Description|
-| -------- | -------- |
-| All | All directions.|
-| Horizontal | Horizontal panning.|
-| Vertical | Vertical panning.|
-| Left | Panning to the left.|
-| Right | Panning to the right.|
-| Up | Panning up.|
-| Down | Panning down.|
-| None | Panning disabled.|
+| Name | Description |
+| ---------- | --------------------- |
+| All | All directions. |
+| Horizontal | Horizontal panning. |
+| Vertical | Vertical panning. |
+| Left | Panning to the left. |
+| Right | Panning to the right. |
+| Up | Panning up. |
+| Down | Panning down. |
+| None | Panning disabled. |
## PanGestureOptions
@@ -47,21 +47,21 @@ See the **PanGesture** parameters.
**APIs**
-| Name| Description|
-| -------- | -------- |
-| setDirection(value: PanDirection) | Sets the direction.|
-| setDistance(value: number) | Sets the distance.|
-| setFingers(value: number) | Sets the number of fingers.|
+| Name | Description |
+| --------------------------------- | --------------------------- |
+| setDirection(value: PanDirection) | Sets the direction. |
+| setDistance(value: number) | Sets the distance. |
+| setFingers(value: number) | Sets the number of fingers. |
## Events
-| Name| Description|
-| -------- | -------- |
-| onActionStart(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when a pan gesture is recognized.|
-| onActionUpdate(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when the pan gesture status is updated.|
-| onActionEnd(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when the finger used for a pan gesture is lift.|
-| onActionCancel(event: () => void) | Callback invoked when a tap cancellation event is received after a pan gesture is recognized.|
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| onActionStart(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when a pan gesture is recognized. |
+| onActionUpdate(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when the pan gesture status is updated. |
+| onActionEnd(event: (event?: [GestureEvent](ts-gesture-settings.md)) => void) | Callback invoked when the finger used for a pan gesture is lift. |
+| onActionCancel(event: () => void) | Callback invoked when a tap cancellation event is received after a pan gesture is recognized. |
## Example
@@ -115,13 +115,3 @@ struct PanGestureExample {
}
}
```
-
-**Diagrams**
-
-Pannig to the left:
-
-
-
-Click Set PanGesture Trigger Condition to two fingers moving toward the lower left corner.
-
- 
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md b/en/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
index 6ebc9a6295720671228fe1651d000fae7c609356..d480a82efc9c652dd8f1cd100cb1cbc31fe690c5 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
@@ -13,20 +13,20 @@ PinchGesture(value?: { fingers?: number, distance?: number })
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| fingers | number | No| Minimum number of fingers to trigger a pinch. The value ranges from 2 to 5.
Default value: **2**|
-| distance | number | No| Minimum recognition distance, in vp.
Default value: **3**|
+| Name | Type | Mandatory | Description |
+| -------- | ------ | --------- | ---------------------------------------- |
+| fingers | number | No | Minimum number of fingers to trigger a pinch. The value ranges from 2 to 5.
Default value: **2** |
+| distance | number | No | Minimum recognition distance, in vp.
Default value: **3** |
## Events
-| Name| Description|
-| -------- | -------- |
-| onActionStart(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when a pinch gesture is recognized.|
-| onActionUpdate(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when the user moves the finger in a pinch gesture on the screen.|
-| onActionEnd(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when the finger used for a pinch gesture is lift.|
-| onActionCancel(event: () => void) | Triggered when a tap cancellation event is received after a pinch gesture is recognized.|
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| onActionStart(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when a pinch gesture is recognized. |
+| onActionUpdate(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when the user moves the finger in a pinch gesture on the screen. |
+| onActionEnd(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when the finger used for a pinch gesture is lift. |
+| onActionCancel(event: () => void) | Triggered when a tap cancellation event is received after a pinch gesture is recognized. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-gestures-swipegesture.md b/en/application-dev/reference/arkui-ts/ts-basic-gestures-swipegesture.md
index 94188dc9a29d7d39f9716df6990bc915ddf58138..e5568e192ae77712dc26e670dc8fc65af4845129 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-gestures-swipegesture.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-gestures-swipegesture.md
@@ -13,27 +13,27 @@ SwipeGesture(value?: { fingers?: number; direction?: SwipeDirection; speed?: num
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| fingers | number | No| Minimum number of fingers to trigger a swipe gesture. The value ranges from 1 to 10.
Default value: **1**|
-| direction | SwipeDirection | No| Swipe direction.
Default value: **SwipeDirection.All**|
-| speed | number | No| Minimum speed of the swipe gesture, in vp/s.
Default value: **100**|
+| Name | Type | Mandatory | Description |
+| --------- | -------------- | --------- | ---------------------------------------- |
+| fingers | number | No | Minimum number of fingers to trigger a swipe gesture. The value ranges from 1 to 10.
Default value: **1** |
+| direction | SwipeDirection | No | Swipe direction.
Default value: **SwipeDirection.All** |
+| speed | number | No | Minimum speed of the swipe gesture, in vp/s.
Default value: **100** |
## SwipeDirection
-| Name| Description|
-| -------- | -------- |
-| All | All directions.|
+| Name | Description |
+| ---------- | --------------------- |
+| All | All directions. |
| Horizontal | Horizontal direction. |
-| Vertical | Vertical direction. |
-| None | Swiping disabled.|
+| Vertical | Vertical direction. |
+| None | Swiping disabled. |
## Events
-| Name| Description|
-| -------- | -------- |
-| onAction(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when a swipe gesture is recognized.|
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| onAction(event:(event?: [GestureEvent](ts-gesture-settings.md)) => void) | Triggered when a swipe gesture is recognized. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md b/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
index aaecac495c9f070952c30487f7ac98bb640f868f..71aaf504d360bec1e1d7b931777d2bbbca15d0d7 100644
--- a/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
+++ b/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
@@ -23,30 +23,30 @@ Shape(value?: PixelMap)
**Parameters**
-| Name| Type| Mandatory| Default Value| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| value | PixelMap | No| - | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target.|
+| Name | Type | Mandatory | Default Value | Description |
+| ----- | -------- | --------- | ------------- | ---------------------------------------- |
+| value | PixelMap | No | - | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target. |
## Attributes
In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported.
-| Name| Type| Default Value| Mandatory| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| viewPort | {
x?: number \| string,
y?: number \| string,
width?: number \| string,
height?: number \| string
} | { x:0, y:0, width:0, height:0 } | No| View port of the shape.|
-| fill | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Color of the fill area.|
-| fillOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Opacity of the fill area.|
-| stroke | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Stroke color.|
-| strokeDashArray | Array<Length> | [] | No| Stroke dash.|
-| strokeDashOffset | number \| string | 0 | No| Offset of the start point for drawing the stroke.|
-| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | No| Cap style of the stroke.|
-| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | No| Join style of the stroke.|
-| strokeMiterLimit | number \| string | 4 | No| Limit value when the sharp angle is drawn as a miter.|
-| strokeOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Stroke opacity.|
-| strokeWidth | number \| string | 1 | No| Stroke width.|
-| antiAlias | boolean | true | No| Whether anti-aliasing is enabled.|
-| mesh8+ | Array<number>,number,number | [],0,0 | No| Mesh effect. The first parameter is an array of lengths (column + 1) * (row + 1) * 2, which records the position of each vertex of the distorted bitmap. The second parameter is the number of columns in the mesh matrix. The third parameter is the number of rows in the mesh matrix.|
+| Name | Type | Default Value | Mandatory | Description |
+| ----------------- | ---------------------------------------- | ------------------------------- | --------- | ---------------------------------------- |
+| viewPort | {
x?: number \| string,
y?: number \| string,
width?: number \| string,
height?: number \| string
} | { x:0, y:0, width:0, height:0 } | No | View port of the shape. |
+| fill | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No | Color of the fill area. |
+| fillOpacity | number \| string \| [Resource](ts-types.md#resource) | 1 | No | Opacity of the fill area. |
+| stroke | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No | Stroke color. |
+| strokeDashArray | Array<Length> | [] | No | Stroke dash. |
+| strokeDashOffset | number \| string | 0 | No | Offset of the start point for drawing the stroke. |
+| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | No | Cap style of the stroke. |
+| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | No | Join style of the stroke. |
+| strokeMiterLimit | number \| string | 4 | No | Limit value when the sharp angle is drawn as a miter. |
+| strokeOpacity | number \| string \| [Resource](ts-types.md#resource) | 1 | No | Stroke opacity. |
+| strokeWidth | number \| string | 1 | No | Stroke width. |
+| antiAlias | boolean | true | No | Whether anti-aliasing is enabled. |
+| mesh8+ | Array<number>,number,number | [],0,0 | No | Mesh effect. The first parameter is an array of lengths (column + 1) * (row + 1) * 2, which records the position of each vertex of the distorted bitmap. The second parameter is the number of columns in the mesh matrix. The third parameter is the number of rows in the mesh matrix. |
## Example
diff --git a/en/application-dev/website.md b/en/application-dev/website.md
index b9977181320d09a131a903737f69463f9cc6d3bd..f5528959daf1869f5678d1bf3c2c6add5c16b155 100644
--- a/en/application-dev/website.md
+++ b/en/application-dev/website.md
@@ -243,8 +243,8 @@
- [Distributed Data Object Development](database/database-distributedobject-guidelines.md)
- Task Management
- Background Task Management
- - [Background Task Management Overview](background-task-management/background-task-overview.md)
- - [Background Task Management Development](background-task-management/background-task-dev-guide.md)
+ - [Background Task Management Overview](task-management/background-task-overview.md)
+ - [Background Task Management Development](task-management/background-task-dev-guide.md)
- Work Scheduler
- [Work Scheduler Overview](task-management/work-scheduler-overview.md)
- [Work Scheduler Development](task-management/work-scheduler-dev-guide.md)
diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/NestedScroll.gif b/zh-cn/application-dev/reference/arkui-ts/figures/NestedScroll.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4d8b706114c0bca1218f13085c7890d46c96ab28
Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/NestedScroll.gif differ
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md
index b6e0e30f1490ec2b2a80d57893ee97f41058d19d..1ccfeedd4439c9acc61061fadd90fa8c44e00cff 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md
@@ -22,30 +22,30 @@ Scroll(scroller?: Scroller)
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
-| 名称 | 参数类型 | 描述 |
-| -------------- | ---------------------------------------- | --------- |
-| scrollable | [ScrollDirection](#scrolldirection枚举说明) | 设置滚动方向。
默认值:ScrollDirection.Vertical |
-| scrollBar | [BarState](ts-appendix-enums.md#barstate) | 设置滚动条状态。
默认值:BarState.Auto |
-| scrollBarColor | string \| number \| [Color](ts-appendix-enums.md#color) | 设置滚动条的颜色。 |
-| scrollBarWidth | string \| number | 设置滚动条的宽度。 |
-| edgeEffect | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | 设置滑动效果,目前支持的滑动效果参见EdgeEffect的枚举说明。
默认值:EdgeEffect.None |
+| 名称 | 参数类型 | 描述 |
+| -------------- | ---------------------------------------- | ---------------------------------------- |
+| scrollable | [ScrollDirection](#scrolldirection枚举说明) | 设置滚动方向。
默认值:ScrollDirection.Vertical |
+| scrollBar | [BarState](ts-appendix-enums.md#barstate) | 设置滚动条状态。
默认值:BarState.Auto |
+| scrollBarColor | string \| number \| [Color](ts-appendix-enums.md#color) | 设置滚动条的颜色。 |
+| scrollBarWidth | string \| number | 设置滚动条的宽度。 |
+| edgeEffect | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | 设置滑动效果,目前支持的滑动效果参见EdgeEffect的枚举说明。
默认值:EdgeEffect.None |
## ScrollDirection枚举说明
-| 名称 | 描述 |
-| ---------- | ------------------------ |
-| Horizontal | 仅支持水平方向滚动。 |
-| Vertical | 仅支持竖直方向滚动。 |
-| None | 不可滚动。 |
-| Free(deprecated) | 支持竖直或水平方向滚动
从API version 9开始废弃|
+| 名称 | 描述 |
+| ---------------------------- | ----------------------------------- |
+| Horizontal | 仅支持水平方向滚动。 |
+| Vertical | 仅支持竖直方向滚动。 |
+| None | 不可滚动。 |
+| Free(deprecated) | 支持竖直或水平方向滚动
从API version 9开始废弃 |
## 事件
-| 名称 | 功能描述 |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| 名称 | 功能描述 |
+| ---------------------------------------- | ---------------------------------------- |
| onScrollBegin9+(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }) | 滚动开始事件回调。
参数:
- dx:即将发生的水平方向滚动量。
- dy:即将发生的竖直方向滚动量。
返回值:
- dxRemain:水平方向滚动剩余量。
- dyRemain:竖直方向滚动剩余量。 |
-| onScroll(event: (xOffset: number, yOffset: number) => void) | 滚动事件回调, 返回滚动时水平、竖直方向偏移量。 |
-| onScrollEdge(event: (side: Edge) => void) | 滚动到边缘事件回调。 |
-| onScrollEnd(event: () => void) | 滚动停止事件回调。 |
+| onScroll(event: (xOffset: number, yOffset: number) => void) | 滚动事件回调, 返回滚动时水平、竖直方向偏移量。 |
+| onScrollEdge(event: (side: Edge) => void) | 滚动到边缘事件回调。 |
+| onScrollEnd(event: () => void) | 滚动停止事件回调。 |
> **说明:**
>
@@ -72,11 +72,11 @@ scrollTo(value: { xOffset: number | string, yOffset: number | string, animation?
**参数:**
-| 参数名 | 参数类型 | 必填 | 参数描述 |
-| --------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
-| xOffset | Length | 是 | 水平滑动偏移。 |
-| yOffset | Length | 是 | 竖直滑动偏移。 |
-| animation | {
duration: number,
curve: [Curve](ts-animatorproperty.md)
} | 否 | 动画配置:
- duration: 滚动时长设置。
- curve: 滚动曲线设置。 |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| --------- | ---------------------------------------- | ---- | ---------------------------------------- |
+| xOffset | Length | 是 | 水平滑动偏移。 |
+| yOffset | Length | 是 | 竖直滑动偏移。 |
+| animation | {
duration: number,
curve: [Curve](ts-animatorproperty.md)
} | 否 | 动画配置:
- duration: 滚动时长设置。
- curve: 滚动曲线设置。 |
### scrollEdge
@@ -88,8 +88,8 @@ scrollEdge(value: Edge): void
**参数:**
-| 参数名 | 参数类型 | 必填 | 参数描述 |
-| ----- | ---- | ---- | --------- |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| ----- | --------------------------------- | ---- | --------- |
| value | [Edge](ts-appendix-enums.md#edge) | 是 | 滚动到的边缘位置。 |
@@ -101,10 +101,10 @@ scrollPage(value: { next: boolean, direction?: Axis }): void
**参数:**
-| 参数名 | 参数类型 | 必填 | 参数描述 |
-| --------- | ------- | ---- | ------------------------------ |
-| next | boolean | 是 | 是否向下翻页。true表示向下翻页,false表示向上翻页。 |
-| direction(deprecated) | [Axis](ts-appendix-enums.md#axis) | 否 | 设置滚动方向为水平或竖直方向。
从API version 9开始废弃 |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| --------------------------------- | --------------------------------- | ---- | --------------------------------------- |
+| next | boolean | 是 | 是否向下翻页。true表示向下翻页,false表示向上翻页。 |
+| direction(deprecated) | [Axis](ts-appendix-enums.md#axis) | 否 | 设置滚动方向为水平或竖直方向。
从API version 9开始废弃 |
### currentOffset
@@ -135,9 +135,9 @@ scrollToIndex(value: number): void
**参数:**
-| 参数名 | 参数类型 | 必填 | 参数描述 |
-| ------ | -------- | ---- | ---------------------------------- |
-| value | number | 是 | 要滑动到的列表项在列表中的索引值。 |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| ----- | ------ | ---- | ----------------- |
+| value | number | 是 | 要滑动到的列表项在列表中的索引值。 |
### scrollBy9+
@@ -154,10 +154,10 @@ scrollBy(dx: Length, dy: Length): void
**参数:**
-| 参数名 | 参数类型 | 必填 | 参数描述 |
-| ----- | ------ | ---- | ----------------- |
-| dx | Length | 是 | 水平方向滚动距离,不支持百分比形式。 |
-| dy | Length | 是 | 竖直方向滚动距离,不支持百分比形式。 |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| ---- | ------ | ---- | ------------------ |
+| dx | Length | 是 | 水平方向滚动距离,不支持百分比形式。 |
+| dy | Length | 是 | 竖直方向滚动距离,不支持百分比形式。 |
## 示例
diff --git a/zh-cn/application-dev/website.md b/zh-cn/application-dev/website.md
index dafb61190f5f75667406f786ab3060d8f85426f3..98a79c1b5451f8f0e77506443bdd802bc034f4fa 100644
--- a/zh-cn/application-dev/website.md
+++ b/zh-cn/application-dev/website.md
@@ -540,7 +540,6 @@
- JS服务卡片UI组件参考
- JS服务卡片UI框架说明
- [文件组织](reference/js-service-widget-ui/js-service-widget-file.md)
- - [配置文件](reference/js-service-widget-ui/js-service-widget-config-file.md)
- 语法
- [HML语法参考](reference/js-service-widget-ui/js-service-widget-syntax-hml.md)
- [CSS语法参考](reference/js-service-widget-ui/js-service-widget-syntax-css.md)