diff --git a/en/application-dev/quick-start/arkts-restrictions-and-extensions.md b/en/application-dev/quick-start/arkts-restrictions-and-extensions.md
index fa62ed392100f7ff0b60dcc6e8ee66ef465fbb3a..b2f31f9aae3188dddfb011f94d971c0db3855d99 100644
--- a/en/application-dev/quick-start/arkts-restrictions-and-extensions.md
+++ b/en/application-dev/quick-start/arkts-restrictions-and-extensions.md
@@ -232,3 +232,26 @@ struct Child {
}
}
```
+
+## Restrictions on Naming Custom Components, Classes, and Functions
+
+The name of a custom component, class, or function cannot be the same as any system component name.
+
+Example:
+
+```
+// Rect.ets
+export class Rect {
+ constructor(){}
+}
+// Index.ets
+// ERROR: The module name 'Rect' can not be the same as the inner component name.
+import { Rect } from './Rect';
+@Entry
+@Component
+struct Index {
+ build() {
+
+ }
+}
+```
diff --git a/en/application-dev/reference/apis/commonEventManager-definitions.md b/en/application-dev/reference/apis/commonEventManager-definitions.md
index 0670b6ca701ef78962deea0085dfbe2db1cbe863..4d400882bb09448ae379336329c873651601060e 100644
--- a/en/application-dev/reference/apis/commonEventManager-definitions.md
+++ b/en/application-dev/reference/apis/commonEventManager-definitions.md
@@ -65,11 +65,13 @@ Indicates that the device's thermal level has changed.
- Required subscriber permissions: none
-## COMMON_EVENT_USER_PRESENT
+## COMMON_EVENT_USER_PRESENT(deprecated)
(Reserved, not supported yet) Indicates that the user unlocks the device.
- Value: **usual.event.USER_PRESENT**
- Required subscriber permissions: none
-
+> NOTE
+>
+> This API is deprecated since API version 10.
## COMMON_EVENT_TIME_TICK
Indicates that the system time has changed as time ticks by.
@@ -929,3 +931,116 @@ Indicates the result of applying a quick fix to the application.
Indicates that the HTTP proxy configuration has changed.
- Value: **usual.event.HTTP_PROXY_CHANGE**
- Required subscriber permissions: none
+
+## COMMON_EVENT_SIM_STATE_CHANGED10+
+Indicates that the SIM card state has changed.
+- Value: **usual.event.SIM_STATE_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SMS_RECEIVED_COMPLETED10+
+Indicates that the SMS message is received.
+- Value: **usual.event.SMS_RECEIVED_COMPLETED**
+- Required subscriber permissions: ohos.permission.RECEIVE_SMS
+
+## COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED10+
+Indicates that an emergency cell broadcast message is received.
+- Value: **usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED**
+- Required subscriber permissions: ohos.permission.RECEIVE_SMS
+
+## COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED10+
+Indicates that a cell broadcast message is received.
+- Value: **usual.event.SMS_CB_RECEIVE_COMPLETED**
+- Required subscriber permissions: ohos.permission.RECEIVE_SMS
+
+## COMMON_EVENT_STK_COMMAND10+
+(Reserved, not supported yet) Indicates the STK command.
+- Value: **usual.event.STK_COMMAND**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_STK_SESSION_END10+
+(Reserved, not supported yet) Indicates that an STK session ends.
+- Value: **usual.event.STK_SESSION_END**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_STK_CARD_STATE_CHANGED10+
+(Reserved, not supported yet) Indicates that the STK card state has changed.
+- Value: **usual.event.STK_CARD_STATE_CHANGED**
+- Required subscriber permissions: ohos.permission
+
+## COMMON_EVENT_STK_ALPHA_IDENTIFIER10+
+(Reserved, not supported yet) Indicates the STK alpha indicator.
+- Value: **usual.event.STK_ALPHA_IDENTIFIER**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED10+
+Indicates that a WAP push message is received.
+- Value: **usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED**
+- Required subscriber permissions: ohos.permission.RECEIVE_SMS
+
+## COMMON_EVENT_OPERATOR_CONFIG_CHANGED10+
+Indicates that the carrier configuration has been updated.
+- Value: **usual.event.OPERATOR_CONFIG_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED10+
+Indicates that the default SIM card for the SMS service has changed.
+- Value: **usual.event.DEFAULT_SMS_SUBSCRIPTION_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED10+
+Indicates that the default SIM card for the mobile data service has changed.
+- Value: **usual.event.DEFAULT_DATA_SUBSCRIPTION_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED10+
+Indicates that the default primary SIM card has changed.
+- Value: **usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED10+
+Indicates that the default SIM card for the voice service has changed.
+- Value: **usual.event.DEFAULT_VOICE_SUBSCRIPTION_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_CALL_STATE_CHANGED10+
+Indicates that the call state has changed.
+- Value: **usual.event.CALL_STATE_CHANGED**
+- Required subscriber permissions: ohos.permission.GET_TELEPHONY_STATE
+
+## COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED10+
+Indicates that the cellular data state has changed.
+- Value: **usual.event.CELLULAR_DATA_STATE_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_NETWORK_STATE_CHANGED10+
+Indicates that the network state has changed.
+- Value: **usual.event.NETWORK_STATE_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SIGNAL_INFO_CHANGED10+
+Indicates that the signal information is updated.
+- Value: **usual.event.SIGNAL_INFO_CHANGED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_INCOMING_CALL_MISSED10+
+Indicates a missed call.
+- Value: **usual.event.INCOMING_CALL_MISSED**
+- Required subscriber permissions: ohos.permission.GET_TELEPHONY_STATE
+
+## COMMON_EVENT_RADIO_STATE_CHANGE10+
+Indicates that the power-on and power-off status of the modem has changed.
+- Value: **usual.event.RADIO_STATE_CHANGE**
+
+## COMMON_EVENT_SCREEN_LOCKED 10+
+
+Indicates that the screen is locked.
+
+- Value: **usual.event.SCREEN_LOCKED**
+- Required subscriber permissions: none
+
+## COMMON_EVENT_SCREEN_UNLOCKED10+
+
+Indicates that the screen is unlocked.
+
+- Value: **usual.event.SCREEN_UNLOCKED**
+- Required subscriber permissions: none
diff --git a/en/application-dev/reference/apis/js-apis-curve.md b/en/application-dev/reference/apis/js-apis-curve.md
index 718c84781a3d2c9b28f9a73de9ed4548027ef09e..d113624577ba5569bf036a6cd0de1664b06f0ab9 100644
--- a/en/application-dev/reference/apis/js-apis-curve.md
+++ b/en/application-dev/reference/apis/js-apis-curve.md
@@ -35,7 +35,6 @@ Implements initialization for the interpolation curve, which is used to create a
| ---------------------------------- | ---------------- |
| [ICurve](#icurve) | Interpolation curve.|
-
**Example**
```ts
@@ -57,7 +56,7 @@ Creates a step curve.
| Name| Type | Mandatory| Description |
| ------ | ------- | ----| ------------------------------------------------------------ |
-| count | number | Yes | Number of steps. The value must be a positive integer. |
+| count | number | Yes | Number of steps. The value must be a positive integer. Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the value **0**.|
| end | boolean | Yes | Whether jumping occurs when the interpolation ends. - **true**: Jumping occurs when the interpolation ends. - **false**: Jumping occurs when the interpolation starts.|
**Return value**
@@ -66,7 +65,6 @@ Creates a step curve.
| ---------------------------------- | ---------------- |
| [ICurve](#icurve) | Interpolation curve.|
-
**Example**
```ts
@@ -85,12 +83,13 @@ Creates a cubic Bezier curve. The curve values must be between 0 and 1.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---- | ------ | ---- | -------------- |
-| x1 | number | Yes | X coordinate of the first point on the Bezier curve.|
-| y1 | number | Yes | Y coordinate of the first point on the Bezier curve.|
-| x2 | number | Yes | X coordinate of the second point on the Bezier curve.|
-| y2 | number | Yes | Y coordinate of the second point on the Bezier curve.|
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| x1 | number | Yes | X coordinate of the first point on the Bezier curve. Value range: [0, 1] **NOTE** A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.|
+| y1 | number | Yes | Y coordinate of the first point on the Bezier curve. Value range: (-∞, +∞) |
+| x2 | number | Yes | X coordinate of the second point on the Bezier curve. Value range: [0, 1] **NOTE** A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.|
+| y2 | number | Yes | Y coordinate of the second point on the Bezier curve. Value range: (-∞, +∞) |
**Return value**
@@ -112,17 +111,17 @@ Curves.cubicBezierCurve(0.1, 0.0, 0.1, 1.0) // Create a cubic Bezier curve.
springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve
-Creates a spring curve.
+Creates a spring curve. The curve shape is subject to the spring parameters, and the animation duration is subject to the **duration** parameter in **animation** and **animateTo**.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
-| Name | Type | Mandatory | Description |
-| --------- | ------ | ---- | ----- |
-| velocity | number | Yes | Initial velocity. It is applied by external factors to the elastic animation. It aims to help ensure the smooth transition from the previous motion state to the elastic animation.|
-| mass | number | Yes | Mass, which influences the inertia in the spring system. The greater the mass, the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position.|
-| stiffness | number | Yes | Stiffness. It is the degree to which an object deforms by resisting the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the speed of restoring to the equilibrium position.|
-| damping | number | Yes | Damping. It is a pure number and has no real physical meaning. It is used to describe the oscillation and attenuation of the system after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller the oscillation amplitude.|
+| Name | Type | Mandatory| Description |
+| --------- | ------ | ---- | ------------------------------------------------------------ |
+| velocity | number | Yes | Initial velocity. It is applied by external factors to the spring animation, designed to help ensure the smooth transition from the previous motion state. Value range: (-∞, +∞)|
+| mass | number | Yes | Mass, which influences the inertia in the spring system. The greater the mass, the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the value **1**.|
+| stiffness | number | Yes | Stiffness. It is the degree to which an object deforms by resisting the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the speed of restoring to the equilibrium position. Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the value **1**.|
+| damping | number | Yes | Damping. It is a pure number and has no real physical meaning. It is used to describe the oscillation and attenuation of the system after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller the oscillation amplitude. Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the value **1**.|
**Return value**
@@ -149,18 +148,19 @@ Creates a spring animation curve. If multiple spring animations are applied to t
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
+
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | ----- |
-| response | number | No | Duration of one complete oscillation, in seconds. Default value: **0.55**|
-| dampingFraction | number | No | Damping coefficient. **0**: undamped. In this case, the spring oscillates forever. > 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position. **1**: critically damped. > 1: overdamped. In this case, the spring approaches equilibrium gradually. Default value: **0.825**|
-| overlapDuration | number | No | Duration for animations to overlap, in seconds. When animations overlap, if the **response** values of the two animations are different, they will transit smoothly over this duration. Default value: **0**|
+| response | number | No | Duration of one complete oscillation, Default value: **0.55** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0.55**.|
+| dampingFraction | number | No | Damping coefficient. **0**: undamped. In this case, the spring oscillates forever. > 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position. **1**: critically damped. > 1: overdamped. In this case, the spring approaches equilibrium gradually. Default value: **0.825** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0.55**.|
+| overlapDuration | number | No | Duration for animations to overlap, in seconds. When animations overlap, if the **response** values of the two animations are different, they will transit smoothly over this duration.
Default value: **0** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0**. The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in **[animation](../arkui-ts/ts-animatorproperty.md)** or **[animateTo](../arkui-ts/ts-explicit-animation.md)**. The time cannot be normalized. Therefore, the interpolation cannot be obtained by using the **[interpolate](#interpolate)** function of the curve.|
**Return value**
| Type | Description |
| ---------------------------------- | ---------------- |
-| [ICurve](#icurve)| Curve. Note: The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. The time cannot be normalized. Therefore, the interpolation cannot be obtained by using the [interpolate](#interpolate) function of the curve.|
+| [ICurve](#icurve)| Curve. **NOTE** The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. The time cannot be normalized. Therefore, the interpolation cannot be obtained by using the **[interpolate](#interpolate)** function of the curve.|
**Example**
@@ -182,17 +182,18 @@ Creates a responsive spring animation curve. It is a special case of [springMoti
**System capability**: SystemCapability.ArkUI.ArkUI.Full
**Parameters**
+
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | ----- |
-| response | number | No | See **response** in **springMotion**. Default value: **0.15**|
-| dampingFraction | number | No | See **dampingFraction** in **springMotion**. Default value: **0.86**|
-| overlapDuration | number | No | See **overlapDuration** in **springMotion**. Default value: **0.25**|
+| response | number | No | See **response** in **springMotion**. Default value: **0.15** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0.15**.|
+| dampingFraction | number | No | See **dampingFraction** in **springMotion**. Default value: **0.86** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0.86**.|
+| overlapDuration | number | No | See **overlapDuration** in **springMotion**. Default value: **0.25** Unit: second Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value **0.25**. To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings. The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in **[animation](../arkui-ts/ts-animatorproperty.md)** or **[animateTo](../arkui-ts/ts-explicit-animation.md)**. In addition, the interpolation cannot be obtained by using the **[interpolate](#interpolate)** function of the curve.|
**Return value**
| Type | Description |
| ---------------------------------- | ---------------- |
-| [ICurve](#icurve)| Curve. **NOTE** 1. To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings. 2. The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. In addition, the interpolation cannot be obtained by using the [interpolate](#interpolate) function of the curve.|
+| [ICurve](#icurve)| Curve. **NOTE** 1. To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings. 2. The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. In addition, the interpolation cannot be obtained by using the **interpolate** function of the curve.|
**Example**
@@ -202,6 +203,39 @@ Curves.responsiveSpringMotion() // Create a responsive spring animation curve wi
```
+## Curves.interpolatingSpringCurve10+
+
+interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve
+
+
+Creates an interpolating spring curve animated from 0 to 1. The actual animation value is calculated based on the curve. The animation duration is subject to the curve parameters, rather than the **duration** parameter in **animation** or **animateTo**.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
+**Parameters**
+| Name | Type | Mandatory | Description |
+| --------- | ------ | ---- | ----- |
+| velocity | number | Yes | Initial velocity. It is applied by external factors to the spring animation, designed to help ensure the smooth transition from the previous motion state. The velocity is the normalized velocity, and its value is equal to the actual velocity at the beginning of the animation divided by the animation attribute change value.|
+| mass | number | Yes | Mass, which influences the inertia in the spring system. The greater the mass, the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position.|
+| stiffness | number | Yes | Stiffness. It is the degree to which an object deforms by resisting the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the speed of restoring to the equilibrium position.|
+| damping | number | Yes | Damping. It is a pure number and has no real physical meaning. It is used to describe the oscillation and attenuation of the system after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller the oscillation amplitude.|
+
+
+**Return value**
+
+| Type | Description |
+| ---------------------------------- | ---------------- |
+| [ICurve](#icurve)| Interpolation curve.|
+
+
+**Example**
+
+```ts
+import Curves from '@ohos.curves'
+Curves.interpolatingSpring(100, 1, 228, 30) // Create an interpolating spring curve whose duration is subject to spring parameters.
+```
+
+
## ICurve
@@ -217,9 +251,9 @@ Since API version 9, this API is supported in ArkTS widgets.
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | ------ | ---- | -------------------------------------------- |
-| fraction | number | Yes | Current normalized time. The value ranges from 0 to 1.|
+| Name | Type | Mandatory| Description |
+| -------- | ------ | ---- | ------------------------------------------------------------ |
+| fraction | number | Yes | Current normalized time. Value range: [0, 1] **NOTE** A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.|
**Return value**
@@ -300,7 +334,7 @@ Creates a spring curve. This API is deprecated since API version 9. You are advi
| Name | Type | Mandatory | Description |
| --------- | ------ | ---- | ----- |
-| velocity | number | Yes | Initial velocity. It is applied by external factors to the elastic animation. It aims to help ensure the smooth transition from the previous motion state to the elastic animation.|
+| velocity | number | Yes | Initial velocity. It is applied by external factors to the spring animation, designed to help ensure the smooth transition from the previous motion state.|
| mass | number | Yes | Mass, which influences the inertia in the spring system. The greater the mass, the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position.|
| stiffness | number | Yes | Stiffness. It is the degree to which an object deforms by resisting the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the speed of restoring to the equilibrium position.|
| damping | number | Yes | Damping. It is a pure number and has no real physical meaning. It is used to describe the oscillation and attenuation of the system after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller the oscillation amplitude.|
diff --git a/en/application-dev/reference/apis/js-apis-matrix4.md b/en/application-dev/reference/apis/js-apis-matrix4.md
index 123602526ffa59a7af9f20c7ee7eb0775ffae0e6..b707f54df167497056052a8524ec00d7bbe11188 100644
--- a/en/application-dev/reference/apis/js-apis-matrix4.md
+++ b/en/application-dev/reference/apis/js-apis-matrix4.md
@@ -281,11 +281,11 @@ Translates this matrix object along the x, y, and z axes.
**Parameters**
-| Name| Type | Mandatory| Description |
-| ------ | ------ | ---- | ------------------------------------- |
-| x | number | No | Translation distance along the x-axis, in px. Default value: **0**|
-| y | number | No | Translation distance along the y-axis, in px. Default value: **0**|
-| z | number | No | Translation distance along the z-axis, in px. Default value: **0**|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ----------------------------------------------------------- |
+| x | number | No | Translation distance along the x-axis, in px. Default value: **0** Value range: (-∞, +∞)|
+| y | number | No | Translation distance along the y-axis, in px. Default value: **0** Value range: (-∞, +∞)|
+| z | number | No | Translation distance along the z-axis, in px. Default value: **0** Value range: (-∞, +∞)|
**Return value**
@@ -328,13 +328,13 @@ Scales this matrix object along the x, y, and z axes.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ------- | ------ | ---- | --------------------------------- |
-| x | number | No | Scaling multiple along the x-axis. Default value: **1** |
-| y | number | No | Scaling multiple along the y-axis. Default value: **1** |
-| z | number | No | Scaling multiple along the z-axis. Default value: **1** |
-| centerX | number | No | X coordinate of the center point. Default value: **0**|
-| centerY | number | No | Y coordinate of the center point. Default value: **0**|
+| Name | Type | Mandatory| Description |
+| ------- | ------ | ---- | ------------------------------------------------------------ |
+| x | number | No | Scaling multiple along the x-axis. If the value is greater than 1, the image is scaled up along the x-axis. If the value is less than 1, the image is scaled down along the x-axis. Default value: **1** Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value.|
+| y | number | No | Scaling multiple along the y-axis. If the value is greater than 1, the image is scaled up along the y-axis. If the value is less than 1, the image is scaled down along the y-axis. Default value: **1** Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value.|
+| z | number | No | Scaling multiple along the z-axis. If the value is greater than 1, the image is scaled up along the z-axis. If the value is less than 1, the image is scaled down along the z-axis. Default value: **1** Value range: [0, +∞) **NOTE** A value less than 0 evaluates to the default value.|
+| centerX | number | No | X coordinate of the center point. Default value: **0** Value range: (-∞, +∞) |
+| centerY | number | No | Y coordinate of the center point. Default value: **0** Value range: (-∞, +∞) |
**Return value**
@@ -376,14 +376,14 @@ Rotates this matrix object along the x, y, and z axes.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ------- | ------ | ---- | --------------------------------- |
-| x | number | No | X coordinate of the rotation axis vector. Default value: **1** |
-| y | number | No | Y coordinate of the rotation axis vector. Default value: **1** |
-| z | number | No | Z coordinate of the rotation axis vector. Default value: **1** |
-| angle | number | No | Rotation angle. Default value: **0** |
-| centerX | number | No | X coordinate of the center point. Default value: **0**|
-| centerY | number | No | Y coordinate of the center point. Default value: **0**|
+| Name | Type | Mandatory| Description |
+| ------- | ------ | ---- | ------------------------------------------------------- |
+| x | number | No | X coordinate of the rotation axis vector. Default value: **1** Value range: (-∞, +∞)|
+| y | number | No | Y coordinate of the rotation axis vector. Default value: **1** Value range: (-∞, +∞)|
+| z | number | No | Z coordinate of the rotation axis vector. Default value: **1** Value range: (-∞, +∞)|
+| angle | number | No | Rotation angle. Default value: **0** |
+| centerX | number | No | X coordinate of the center point. Default value: **0** |
+| centerY | number | No | Y coordinate of the center point. Default value: **0** |
**Return value**
diff --git a/en/application-dev/reference/apis/js-apis-screen-lock.md b/en/application-dev/reference/apis/js-apis-screen-lock.md
index 2ee3029a1f51022c1ce7bf39fddfe9288ec45e11..e399c34b8d29b71e3e1697dcd0778c648e744bb7 100644
--- a/en/application-dev/reference/apis/js-apis-screen-lock.md
+++ b/en/application-dev/reference/apis/js-apis-screen-lock.md
@@ -150,6 +150,8 @@ Locks the screen. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.MiscServices.ScreenLock
+**Required permissions**: ohos.permission.ACCESS_SCREEN_LOCK_INNER
+
**System API**: This is a system API.
**Parameters**
@@ -186,6 +188,8 @@ Locks the screen. This API uses a promise to return the result.
**System capability**: SystemCapability.MiscServices.ScreenLock
+**Required permissions**: ohos.permission.ACCESS_SCREEN_LOCK_INNER
+
**System API**: This is a system API.
**Return value**
@@ -220,6 +224,8 @@ Registers a callback for system events related to screen locking. This API can b
**System capability**: SystemCapability.MiscServices.ScreenLock
+**Required permissions**: ohos.permission.ACCESS_SCREEN_LOCK_INNER
+
**System API**: This is a system API.
**Parameters**
@@ -262,6 +268,8 @@ Sends an event to the screen lock service. This API uses an asynchronous callbac
**System capability**: SystemCapability.MiscServices.ScreenLock
+**Required permissions**: ohos.permission.ACCESS_SCREEN_LOCK_INNER
+
**System API**: This is a system API.
**Parameters**
@@ -300,6 +308,8 @@ Sends an event to the screen lock service. This API uses a promise to return the
**System capability**: SystemCapability.MiscServices.ScreenLock
+**Required permissions**: ohos.permission.ACCESS_SCREEN_LOCK_INNER
+
**System API**: This is a system API.
**Parameters**
diff --git a/en/application-dev/reference/apis/js-apis-webview.md b/en/application-dev/reference/apis/js-apis-webview.md
index 16e1356b88974ab8e4e7fcd4b76a021928847018..503e6c262bfb56825687d109ce670321ab4d015a 100644
--- a/en/application-dev/reference/apis/js-apis-webview.md
+++ b/en/application-dev/reference/apis/js-apis-webview.md
@@ -81,7 +81,7 @@ import web_webview from '@ohos.web.webview'
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController();
- msgPort: WebMessagePort[] = null;
+ msgPort: web_webview.WebMessagePort[] = null;
build() {
Column() {
@@ -214,6 +214,240 @@ struct WebComponent {
}
```
+### isExtentionType10+
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+| Name | Type | Readable| Writable| Description |
+| ------------ | ------ | ---- | ---- | ------------------------------------------------|
+| isExtentionType | boolean | Yes | No| Whether to use the extended interface when creating a **WebMessagePort** instance. |
+
+### postMessageEventExt10+
+
+postMessageEventExt(message: WebMessageExt): void
+
+Sends a message. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| ------- | ------ | ---- | :------------- |
+| message | [WebMessageExt](#webmessageext) | Yes | Message to send.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100010 | Can not post message using this port. |
+
+
+### onMessageEventExt10+
+
+onMessageEventExt(callback: (result: WebMessageExt) => void): void
+
+Registers a callback to receive messages from the HTML5 side.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | -------- | ---- | :------------------- |
+| result | [WebMessageExt](#webmessageext10) | Yes | Message received.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ----------------------------------------------- |
+| 17100006 | Can not register message event using this port. |
+
+**Example**
+
+```ts
+// xxx.ets
+import web_webview from '@ohos.web.webview'
+
+// Example of sending messages between an application and a web page: Use the init_web_messageport channel to receive messages from the web page on the application side through port 0 and receive messages from the application on the web page side through port 1.
+@Entry
+@Component
+struct WebComponent {
+ controller: web_webview.WebviewController = new web_webview.WebviewController();
+ ports: web_webview.WebMessagePort[] = null;
+ nativePort: web_webview.WebMessagePort = null;
+ @State msg1:string = "";
+ @State msg2:string = "";
+ message: web_webview.WebMessageExt = new web_webview.WebMessageExt();
+ build() {
+ Column() {
+ Text(this.msg1).fontSize(16)
+ Text(this.msg2).fontSize(16)
+ Button('SendToH5')
+ .onClick(() => {
+ // Use the local port to send messages to HTML5.
+ try {
+ console.log("In eTS side send true start");
+ if (this.nativePort) {
+ this.message.setString("helloFromEts");
+ this.nativePort.postMessageEventExt(this.message);
+ }
+ }
+ catch (error) {
+ console.log("In eTS side send message catch error:" + error.code + ", msg:" + error.message);
+ }
+ })
+
+ Web({ src: $rawfile('index.html'), controller: this.controller })
+ .onPageEnd((e)=>{
+ console.log("In eTS side message onPageEnd init mesaage channel");
+ // 1. Create a message port.
+ this.ports = this.controller.createWebMessagePorts(true);
+ // 2. Send port 1 to HTML5.
+ this.controller.postMessage("init_web_messageport", [this.ports[1]], "*");
+ // 3. Save port 0 to the local host.
+ this.nativePort = this.ports[0];
+ // 4. Set the callback.
+ this.nativePort.onMessageEventExt((result) => {
+ console.log("In eTS side got message");
+ try {
+ var type = result.getType();
+ console.log("In eTS side getType:" + type);
+ switch (type) {
+ case web_webview.WebMessageType.STRING: {
+ this.msg1 = "result type:" + typeof (result.getString());
+ this.msg2 = "result getString:" + ((result.getString()));
+ break;
+ }
+ case web_webview.WebMessageType.NUMBER: {
+ this.msg1 = "result type:" + typeof (result.getNumber());
+ this.msg2 = "result getNumber:" + ((result.getNumber()));
+ break;
+ }
+ case web_webview.WebMessageType.BOOLEAN: {
+ this.msg1 = "result type:" + typeof (result.getBoolean());
+ this.msg2 = "result getBoolean:" + ((result.getBoolean()));
+ break;
+ }
+ case web_webview.WebMessageType.ARRAY_BUFFER: {
+ this.msg1 = "result type:" + typeof (result.getArrayBuffer());
+ this.msg2 = "result getArrayBuffer byteLength:" + ((result.getArrayBuffer().byteLength));
+ break;
+ }
+ case web_webview.WebMessageType.ARRAY: {
+ this.msg1 = "result type:" + typeof (result.getArray());
+ this.msg2 = "result getArray:" + result.getArray();
+ break;
+ }
+ case web_webview.WebMessageType.ERROR: {
+ this.msg1 = "result type:" + typeof (result.getError());
+ this.msg2 = "result getError:" + result.getError();
+ break;
+ }
+ default: {
+ this.msg1 = "default break, type:" + type;
+ break;
+ }
+ }
+ }
+ catch (resError) {
+ console.log(`log error code: ${resError.code}, Message: ${resError.message}`);
+ }
+ });
+ })
+ }
+ }
+}
+```
+
+```html
+
+
+
+
+ WebView MessagePort Demo
+
+
+
+
Html5 Send and Receive Message
+
Receive string:
+
Receive arraybuffer:
+
+
+
+
+
+
+```
+
+```js
+//index.js
+var h5Port;
+window.addEventListener('message', function(event) {
+ if (event.data == 'init_web_messageport') {
+ if(event.ports[0] != null) {
+ h5Port = event.ports[0]; // 1. Save the port number sent from the eTS side.
+ h5Port.onmessage = function(event) {
+ console.log("hwd In html got message");
+ // 2. Receive the message sent from the ArkTS side.
+ var result = event.data;
+ console.log("In html got message, typeof: ", typeof(result));
+ console.log("In html got message, result: ", (result));
+ if (typeof(result) == "string") {
+ console.log("In html got message, String: ", result);
+ document.getElementById("msg").innerHTML = "String:" + result;
+ } else if (typeof(result) == "number") {
+ console.log("In html side got message, number: ", result);
+ document.getElementById("msg").innerHTML = "Number:" + result;
+ } else if (typeof(result) == "boolean") {
+ console.log("In html side got message, boolean: ", result);
+ document.getElementById("msg").innerHTML = "Boolean:" + result;
+ } else if (typeof(result) == "object") {
+ if (result instanceof ArrayBuffer) {
+ document.getElementById("msg2").innerHTML = "ArrayBuffer:" + result.byteLength;
+ console.log("In html got message, byteLength: ", result.byteLength);
+ } else if (result instanceof Error) {
+ console.log("In html error message, err:" + (result));
+ console.log("In html error message, typeof err:" + typeof(result));
+ document.getElementById("msg2").innerHTML = "Error:" + result.name + ", msg:" + result.message;
+ } else if (result instanceof Array) {
+ console.log("In html got message, Array");
+ console.log("In html got message, Array length:" + result.length);
+ console.log("In html got message, Array[0]:" + (result[0]));
+ console.log("In html got message, typeof Array[0]:" + typeof(result[0]));
+ document.getElementById("msg2").innerHTML = "Array len:" + result.length + ", value:" + result;
+ } else {
+ console.log("In html got message, not any instance of support type");
+ document.getElementById("msg").innerHTML = "not any instance of support type";
+ }
+ } else {
+ console.log("In html got message, not support type");
+ document.getElementById("msg").innerHTML = "not support type";
+ }
+ }
+ h5Port.onmessageerror = (event) => {
+ console.error(`hwd In html Error receiving message: ${event}`);
+ };
+ }
+ }
+})
+
+// Use h5Port to send a message of the string type to the ArkTS side.
+function postStringToApp() {
+ if (h5Port) {
+ console.log("In html send string message");
+ h5Port.postMessage("hello");
+ console.log("In html send string message end");
+ } else {
+ console.error("In html h5port is null, please init first");
+ }
+}
+```
+
## WebviewController
Implements a **WebviewController** to control the behavior of the **\** component. A **WebviewController** can control only one **\** component, and the APIs (except static APIs) in the **WebviewController** can be invoked only after it has been bound to the target **\** component.
@@ -422,7 +656,8 @@ struct WebComponent {
}
```
-Example of loading local web pages:
+There are three methods for loading local resource files:
+1. Using $rawfile
```ts
// xxx.ets
import web_webview from '@ohos.web.webview'
@@ -448,7 +683,7 @@ struct WebComponent {
}
}
```
-
+2. Using the resources protocol
```ts
// xxx.ets
import web_webview from '@ohos.web.webview'
@@ -475,6 +710,8 @@ struct WebComponent {
}
```
+3. Using a sandbox path. For details, see the example of loading local resource files in the sandbox in [Web](../arkui-ts/ts-basic-components-web.md#web).
+
```html
@@ -1229,6 +1466,232 @@ struct WebComponent {
}
```
+
+### runJavaScriptExt10+
+
+runJavaScriptExt(script: string, callback : AsyncCallback\): void
+
+Executes a JavaScript script. This API uses an asynchronous callback to return the script execution result. **runJavaScriptExt** can be invoked only after **loadUrl** is executed. For example, it can be invoked in **onPageEnd**.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | -------------------- | ---- | ---------------------------- |
+| script | string | Yes | JavaScript script. |
+| callback | AsyncCallback\<[JsMessageExt](#jsmessageext10)\> | Yes | Callback used to return the result.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------------------------------ |
+| 17100001 | Init error. The WebviewController must be associated with a Web compoent. |
+
+**Example**
+
+```ts
+import web_webview from '@ohos.web.webview'
+
+@Entry
+@Component
+struct WebComponent {
+ controller: web_webview.WebviewController = new web_webview.WebviewController();
+ @State msg1: string = ''
+ @State msg2: string = ''
+
+ build() {
+ Column() {
+ Text(this.msg1).fontSize(20)
+ Text(this.msg2).fontSize(20)
+ Web({ src: $rawfile('index.html'), controller: this.controller })
+ .javaScriptAccess(true)
+ .onPageEnd(e => {
+ try {
+ this.controller.runJavaScriptExt(
+ 'test()',
+ (error, result) => {
+ if (error) {
+ console.info(`run JavaScript error: ` + JSON.stringify(error))
+ return;
+ }
+ if (result) {
+ try {
+ var type = result.getType();
+ switch (type) {
+ case web_webview.JsMessageType.STRING: {
+ this.msg1 = "result type:" + typeof (result.getString());
+ this.msg2 = "result getString:" + ((result.getString()));
+ break;
+ }
+ case web_webview.JsMessageType.NUMBER: {
+ this.msg1 = "result type:" + typeof (result.getNumber());
+ this.msg2 = "result getNumber:" + ((result.getNumber()));
+ break;
+ }
+ case web_webview.JsMessageType.BOOLEAN: {
+ this.msg1 = "result type:" + typeof (result.getBoolean());
+ this.msg2 = "result getBoolean:" + ((result.getBoolean()));
+ break;
+ }
+ case web_webview.JsMessageType.ARRAY_BUFFER: {
+ this.msg1 = "result type:" + typeof (result.getArrayBuffer());
+ this.msg2 = "result getArrayBuffer byteLength:" + ((result.getArrayBuffer().byteLength));
+ break;
+ }
+ case web_webview.JsMessageType.ARRAY: {
+ this.msg1 = "result type:" + typeof (result.getArray());
+ this.msg2 = "result getArray:" + result.getArray();
+ break;
+ }
+ default: {
+ this.msg1 = "default break, type:" + type;
+ break;
+ }
+ }
+ }
+ catch (resError) {
+ console.log(`log error code: ${resError.code}, Message: ${resError.message}`);
+ }
+ }
+ });
+ console.info('url: ', e.url);
+ } catch (error) {
+ console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
+ }
+ })
+ }
+ }
+}
+
+//index.html
+
+
+
+
+
+
+
+```
+
### deleteJavaScriptRegister
deleteJavaScriptRegister(name: string): void
@@ -1565,12 +2028,18 @@ struct WebComponent {
### createWebMessagePorts
- createWebMessagePorts(): Array\
+createWebMessagePorts(isExtentionType?: boolean): Array\
-Creates web message ports.
+Creates web message ports. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
**System capability**: SystemCapability.Web.Webview.Core
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ---------------------- | ---- | :------------------------------|
+| isExtentionType10+ | boolean | No | Whether to use the extended interface. The default value is **false**, indicating that the extended interface is not used.|
+
**Return value**
| Type | Description |
@@ -1626,8 +2095,8 @@ Sends a web message to an HTML5 window.
| Name| Type | Mandatory| Description |
| ------ | ---------------------- | ---- | :------------------------------- |
-| name | string | Yes | Message to send, including the data and message port.|
-| ports | Array\ | Yes | Ports for receiving the message. |
+| name | string | Yes | Name of the message to send. |
+| ports | Array\ | Yes | Message ports for sending the message. |
| uri | string | Yes | URI for receiving the message. |
**Error codes**
@@ -1739,9 +2208,9 @@ var output = document.querySelector('.output');
window.addEventListener('message', function (event) {
if (event.data == '__init_port__') {
if (event.ports[0] != null) {
- h5Port = event.ports[0]; // 1. Save the port number sent from the ArkTS side.
+ h5Port = event.ports[0]; // 1. Save the port number sent from the eTS side.
h5Port.onmessage = function (event) {
- // 2. Receive the message sent from the ArkTS side.
+ // 2. Receive the message sent from the eTS side.
var msg = 'Got message from ets:';
var result = event.data;
if (typeof(result) == "string") {
@@ -1763,7 +2232,7 @@ window.addEventListener('message', function (event) {
}
})
-// 3. Use h5Port to send messages to the ArkTS side.
+// 3. Use h5Port to send messages to the eTS side.
function PostMsgToEts(data) {
if (h5Port) {
h5Port.postMessage(data);
@@ -3572,7 +4041,7 @@ struct Index {
}
```
-### setAudioMuted
+### setAudioMuted10+
setAudioMuted(mute: boolean): void
@@ -3586,6 +4055,14 @@ Mutes this web page.
| -------- | ------- | ---- | -------------------------------------- |
| mute | boolean | Yes | Whether to mute the web page. The value **true** means to mute the web page, and **false** means the opposite.|
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------------------------------ |
+| 17100001 | Init error. The WebviewController must be associated with a Web component. |
+
**Example**
```ts
@@ -3618,7 +4095,7 @@ Implements a **WebCookieManager** instance to manage behavior of cookies in **\<
static getCookie(url: string): string
-Obtains the cookie value corresponding to the specified URL.
+Obtains the cookie corresponding to the specified URL.
**System capability**: SystemCapability.Web.Webview.Core
@@ -3626,7 +4103,7 @@ Obtains the cookie value corresponding to the specified URL.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | :------------------------ |
-| url | string | Yes | URL of the cookie value to obtain. A complete URL is recommended.|
+| url | string | Yes | URL of the cookie to obtain. A complete URL is recommended.|
**Return value**
@@ -3674,7 +4151,7 @@ struct WebComponent {
static setCookie(url: string, value: string): void
-Sets a cookie value for the specified URL.
+Sets a cookie for the specified URL.
**System capability**: SystemCapability.Web.Webview.Core
@@ -3867,7 +4344,7 @@ Checks whether the **WebCookieManager** instance has the permission to send and
| Type | Description |
| ------- | -------------------------------- |
-| boolean | Whether the **WebCookieManager** instance has the permission to send and receive cookies.|
+| boolean | Whether the **WebCookieManager** instance has the permission to send and receive cookies. The default value is **true**.|
**Example**
@@ -3946,7 +4423,7 @@ Checks whether the **WebCookieManager** instance has the permission to send and
| Type | Description |
| ------- | -------------------------------------- |
-| boolean | Whether the **WebCookieManager** instance has the permission to send and receive third-party cookies.|
+| boolean | Whether the **WebCookieManager** instance has the permission to send and receive third-party cookies. The default value is **false**.|
**Example**
@@ -5112,6 +5589,463 @@ Describes the data types supported for [WebMessagePort](#webmessageport).
| string | String type.|
| ArrayBuffer | Binary type.|
+## JsMessageType10+
+
+Describes the type of the returned result of script execution using [runJavaScirptExt](#runjavascriptext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+| Name | Value| Description |
+| ------------ | -- |--------------------------------- |
+| NOT_SUPPORT | 0 |Unsupported data type.|
+| STRING | 1 |String type.|
+| NUMBER | 2 |Number type.|
+| BOOLEAN | 3 |Boolean type.|
+| ARRAY_BUFFER | 4 |Raw binary data buffer.|
+| ARRAY | 5 |Array type.|
+
+
+## WebMessageType10+
+
+Describes the data type supported by the [webMessagePort](#webmessageport) API.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+| Name | Value| Description |
+| ------------ | -- |------------------------------- |
+| NOT_SUPPORT | 0 |Unsupported data type.|
+| STRING | 1 |String type.|
+| NUMBER | 2 |Number type.|
+| BOOLEAN | 3 |Boolean type.|
+| ARRAY_BUFFER | 4 |Raw binary data buffer.|
+| ARRAY | 5 |Array type.|
+| ERROR | 6 |Error object type.|
+
+## JsMessageExt10+
+
+Implements the **JsMessageExt** data object that is returned after script execution using the [runJavaScirptExt](#runjavascriptext10) API.
+
+### getType10+
+
+getType(): JsMessageType
+
+Obtains the type of the data object.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| --------------------------------------------------------- |
+| [JsMessageType](#jsmessagetype10) | Type of the data object that is returned after script execution using the [runJavaScirptExt](#runjavascriptext10) API.|
+
+### getString10+
+
+getString(): string
+
+Obtains string-type data of the data object. For the complete sample code, see [runJavaScriptExt](#runjavascriptext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| string | Data of the string type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the result. |
+
+
+### getNumber10+
+
+getNumber(): number
+
+Obtains number-type data of the data object. For the complete sample code, see [runJavaScriptExt](#runjavascriptext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| number | Data of the number type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the result. |
+
+### getBoolean10+
+
+getBoolean(): boolean
+
+Obtains Boolean-type data of the data object. For the complete sample code, see [runJavaScriptExt](#runjavascriptext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| boolean | Data of the Boolean type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the result. |
+
+
+### getArrayBuffer10+
+
+getArrayBuffer(): ArrayBuffer
+
+Obtains raw binary data of the data object. For the complete sample code, see [runJavaScriptExt](#runjavascriptext10).
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| ArrayBuffer | Raw binary data.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the result. |
+
+### getArray10+
+
+getArray(): Array\
+
+Obtains array-type data of the data object. For the complete sample code, see [runJavaScriptExt](#runjavascriptext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| Array\ | Data of the array type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the result. |
+
+
+## WebMessageExt10+
+
+Data object received and sent by the [webMessagePort](#webmessageport) interface.
+
+### getType10+
+
+getType(): WebMessageType
+
+Obtains the type of the data object.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| --------------------------------------------------------- |
+| [WebMessageType](#webmessagetype10) | Data type supported by the [webMessagePort](#webmessageport) API.|
+
+
+### getString10+
+
+getString(): string
+
+Obtains string-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| string | Data of the string type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+
+### getNumber10+
+
+getNumber(): number
+
+Obtains number-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| number | Data of the number type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+
+### getBoolean10+
+
+getBoolean(): boolean
+
+Obtains Boolean-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| boolean | Data of the Boolean type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+
+### getArrayBuffer10+
+
+getArrayBuffer(): ArrayBuffer
+
+Obtains raw binary data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| ArrayBuffer | Raw binary data.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### getArray10+
+
+getArray(): Array\
+
+Obtains array-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| Array\ | Data of the array type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### getError10+
+
+getError(): Error
+
+Obtains the error-object-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Return value**
+
+| Type | Description |
+| --------------| ------------- |
+| Error | Data of the error object type.|
+
+**Error codes**
+
+For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+
+### setType10+
+
+setType(type: WebMessageType): void
+
+Sets the type for the data object.
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ---------------------- |
+| type | [WebMessageType](#webmessagetype10) | Yes | Data type supported by the [webMessagePort](#webmessageport) API.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setString10+
+
+setString(message: string): void
+
+Sets the string-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | string | Yes | String type.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setNumber10+
+
+setNumber(message: number): void
+
+Sets the number-type data of the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | number | Yes | Data of the number type.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setBoolean10+
+
+setBoolean(message: boolean): void
+
+Sets the Boolean-type data for the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | boolean | Yes | Data of the Boolean type.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setArrayBuffer10+
+
+setArrayBuffer(message: ArrayBuffer): void
+
+Sets the raw binary data for the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | ArrayBuffer | Yes | Raw binary data.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setArray10+
+
+setArray(message: Array\): void
+
+Sets the array-type data for the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | Array\ | Yes | Data of the array type.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+### setError10+
+
+setError(message: Error): void
+
+Sets the error-object-type data for the data object. For the complete sample code, see [onMessageEventExt](#onmessageeventext10).
+
+**System capability**: SystemCapability.Web.Webview.Core
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| message | Error | Yes | Data of the error object type.|
+
+**Error codes**
+
+| ID| Error Message |
+| -------- | ------------------------------------- |
+| 17100014 | The type does not match with the value of the web message. |
+
+
## WebStorageOrigin
Provides usage information of the Web SQL Database.
diff --git a/en/application-dev/reference/arkui-js/js-components-common-mediaquery.md b/en/application-dev/reference/arkui-js/js-components-common-mediaquery.md
index 30d94245e6e41d153dbe15f04e5f650a1f813a2e..3b6b1898bb78591d6c4b1944d31295c046e11618 100644
--- a/en/application-dev/reference/arkui-js/js-components-common-mediaquery.md
+++ b/en/application-dev/reference/arkui-js/js-components-common-mediaquery.md
@@ -64,11 +64,11 @@ Media logical operators (and, or, not, and only) are used to implement complex m
| Type | Description |
| -------- | ---------------------------------------- |
-| and | The **and** operator is used to combine multiple media features into one media query, in a logical AND operation. The query is valid only when all media features are true. It can also combine media types and media functions. For example, **screen and (device-type: wearable) and (max-height: 600) ** evaluates to true when the device type is wearable and the maximum height of the application is 600 pixel units.|
-| not | The **not** operator is used to perform a logical negation for a media query. **true** is returned if the query condition is not met. Otherwise, **false** is returned. In a media query list, logical negation is performed only for the media query using the **not** operator. For example, **not screen and (min-height: 50) and (max-height: 600) ** evaluates to true when the height of the application is less than 50 pixel units or greater than 600 pixel units. You must specify the media type when using the **not** operator.|
+| and | The **and** operator is used to combine multiple media features into one media query, in a logical AND operation. The query is valid only when all media features are true. It can also combine media types and media functions. For example, **screen and (device-type: wearable) and (max-height: 600)** evaluates to **true** when the device type is wearable and the maximum height of the application is 600 pixel units.|
+| not | The **not** operator is used to perform a logical negation for a media query. **true** is returned if the query condition is not met. Otherwise, **false** is returned. In a media query list, logical negation is performed only for the media query using the **not** operator. For example, **not screen and (min-height: 50) and (max-height: 600)** evaluates to **true** when the height of the application is less than 50 pixel units or greater than 600 pixel units. You must specify the media type when using the **not** operator.|
| only | The **only** operator applies the selected style only when the entire expression is matched. It can be used to prevent ambiguity on browsers of earlier versions. The statements that contain both media types and media features produce ambiguity when they are received by some browsers of earlier versions. For example: screen and (min-height: 50) The browsers of earlier versions would mislead this sentence into **screen**, causing the fact that the specified style is applied when only the media type is matched. In this case, the **only** operator can be used to avoid this problem. You must specify the media type when using the **only** operator.|
-| ,(comma) | The **or** operator is used to combine multiple media features into one media query, in a logical OR operation. The query is valid if a media feature is true. The effect of a comma operator is equivalent to that of the **or** operator. For example, **screen and (min-height: 1000), (round-screen: true) ** evaluates to true when the minimum height of the application is 1000 pixel units or the device screen is round.|
-| or | The **or** operator is used to combine multiple media features into one media query, in a logical OR operation. The query is valid if a media feature is true. For example, **screen and (max-height: 1000) or (round-screen: true)** evaluates to true when the maximum height of the application is 1000 pixel units or the device screen is round.|
+| ,(comma) | The **or** operator is used to combine multiple media features into one media query, in a logical OR operation. The query is valid if a media feature is true. The effect of a comma operator is equivalent to that of the **or** operator. For example, **screen and (min-height: 1000), (round-screen: true)** evaluates to **true** when the minimum height of the application is 1000 pixel units or the device screen is round.|
+| or | The **or** operator is used to combine multiple media features into one media query, in a logical OR operation. The query is valid if a media feature is true. For example, **screen and (max-height: 1000) or (round-screen: true)** evaluates to **true** when the maximum height of the application is 1000 pixel units or the device screen is round.|
At MediaQuery Level 4, range query is imported so that you can use the operators including <=, >=, <, and > besides the max- and min-operators.
diff --git a/en/application-dev/reference/arkui-ts/figures/list1.gif b/en/application-dev/reference/arkui-ts/figures/list1.gif
new file mode 100644
index 0000000000000000000000000000000000000000..3e09842f3905ddf22e145b044238340b07b480ca
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/list1.gif differ
diff --git a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
index d5d669429dcb6af79c26cdc49661f1087c871472..11ce9d0312a22f1e9c432d99716319589b551d43 100644
--- a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
+++ b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
@@ -14,13 +14,13 @@ Since API version 9, this API is supported in ArkTS widgets.
| Name | Type | Mandatory | Description |
| ---------- | ------------------------------------------| ---- | ------------------------------------------------------------ |
-| duration | number | No | Animation duration, in ms. Default value: **1000** Since API version 9, this API is supported in ArkTS widgets. **NOTE** The maximum animation duration on an ArkTS widget is 1000 ms. If the set value exceeds the limit, the value **1000** will be used. |
-| tempo | number | No | Animation playback speed. A greater value indicates a higher animation playback speed. The value **0** indicates that no animation is applied. Default value: **1**|
-| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve9+ | No | Animation curve. Default value: **Curve.Linear** Since API version 9, this API is supported in ArkTS widgets. |
-| delay | number | No | Delay of animation playback, in ms. The value **0** indicates that the playback is not delayed. Default value: **0** |
-| iterations | number | No | Number of times that the animation is played. The value **-1** indicates that the animation is played for an unlimited number of times. Default value: **1**|
+| duration | number | No | Animation duration, in ms. Default value: **1000** Unit: ms Since API version 9, this API is supported in ArkTS widgets. **NOTE** - The maximum animation duration on an ArkTS widget is 1000 ms. - A value less than 1 evaluates to the value **0**. - If the value is of the floating point type, the value is rounded down. If the value is 1.2, the value **1** is used.|
+| tempo | number | No | Animation playback speed. A larger value indicates a higher animation playback speed. The value **0** indicates that no animation is applied. Default value: **1** **NOTE** A value less than 1 evaluates to the value **1**.|
+| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve9+ | No | Animation curve. The default curve is linear. Default value: **Curve.Linear** Since API version 9, this API is supported in ArkTS widgets.|
+| delay | number | No | Delay of animation playback, in ms. The value **0** indicates that the playback is not delayed. Default value: **0** Value range: [0, +∞) **NOTE** A value less than 1 evaluates to the value **0**. If the value is of the floating point type, the value is rounded down. If the value is 1.2, the value **1** is used.|
+| iterations | number | No | Number of times that the animation is played. Default value: **1** Value range: [-1, +∞) **NOTE** The value **-1** indicates that the animation is played for an unlimited number of times. The value **0** indicates that no animation is applied.|
| playMode | [PlayMode](ts-appendix-enums.md#playmode) | No | Animation playback mode. By default, the animation is played from the beginning after the playback is complete. Default value: **PlayMode.Normal** Since API version 9, this API is supported in ArkTS widgets.|
-| onFinish | () => void | No | Callback invoked when the animation playback is complete. Since API version 9, this API is supported in ArkTS widgets.|
+| onFinish | () => void | No | Callback invoked when the animation playback is complete. Since API version 9, this API is supported in ArkTS widgets. **NOTE** This callback is not invoked when **iterations** is set to **-1**.|
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
index cf2dda07a27288101b36e111dd5ff2a51c390dff..dbc249b03b068a777ce4977e940f52860720d037 100644
--- a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
+++ b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
@@ -237,8 +237,8 @@ Since API version 9, this API is supported in ArkTS widgets.
| Name | Description |
| ------ | -------------------------------------------------- |
| All | The transition takes effect in all scenarios.|
-| Insert | The transition takes effect when a component is inserted. |
-| Delete | The transition takes effect when a component is deleted. |
+| Insert | The transition takes effect when a component is inserted or displayed.|
+| Delete | The transition takes effect when a component is deleted or hidden.|
## RelateType
@@ -307,12 +307,12 @@ Since API version 9, this API is supported in ArkTS widgets.
| Name | Description |
| -------- | ------------------------------------------------------------ |
-| Auto | The default configuration in the flex container is used. |
-| Start | The elements are in the flex container, top-aligned in the cross-axis direction. |
-| Center | The elements are in the flex container, centered in the cross-axis direction. |
-| End | The elements are in the flex container, bottom-aligned in the cross-axis direction. |
-| Stretch | The elements are in the flex container, stretched and padded in the cross-axis direction. If the size is not set, the elements are stretched to the container size.|
-| Baseline | The elements are in the flex container, text baseline aligned in the cross-axis direction. |
+| Auto | The default configuration of the flex container is used. |
+| Start | The items in the flex container are aligned with the cross-start edge. |
+| Center | The items in the flex container are centered along the cross axis. |
+| End | The items in the flex container are aligned with the cross-end edge. |
+| Stretch | The items in the flex container are stretched and padded along the cross axis. If the flex container has the **Wrap** attribute set to **FlexWrap.Wrap** or **FlexWrap.WrapReverse**, the items are stretched to the cross size of the widest element on the current row or column. In other cases, the items with no size set are stretched to the container size.|
+| Baseline | The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis. |
## FlexDirection
@@ -520,30 +520,30 @@ Since API version 9, this API is supported in ArkTS widgets.
This API is supported in ArkTS widgets.
- | Name| Description|
- | ------- | ---------- |
- | Thin | Thin material. |
- | Regular | Regular material. |
- | Thick | Thick material. |
- | BackgroundThin | Material that creates the minimum depth of field effect.|
- | BackgroundRegular | Material that creates a medium shallow depth of field effect.|
- | BackgroundThick | Material that creates a high shallow depth of field effect.|
- | BackgroundUltraThick | Material that creates the maximum depth of field effect.|
-
+| Name| Description|
+| ------- | ---------- |
+| Thin | Thin material. |
+| Regular | Regular material. |
+| Thick | Thick material. |
+| BackgroundThin | Material that creates the minimum depth of field effect.|
+| BackgroundRegular | Material that creates a medium shallow depth of field effect.|
+| BackgroundThick | Material that creates a high shallow depth of field effect.|
+| BackgroundUltraThick | Material that creates the maximum depth of field effect.|
+
## ThemeColorMode10+
- | Name | Description |
- | ------- | ---------- |
- | System | Following the system color mode.|
- | Light | Light color mode.|
- | Dark | Dark color mode.|
+| Name | Description |
+| ------- | ---------- |
+| System | Following the system color mode.|
+| Light | Light color mode.|
+| Dark | Dark color mode.|
## AdaptiveColor10+
- | Name | Description |
- | ------- | ----------- |
- | Default | Adaptive color mode is not used. The default color is used as the mask color.|
- | Average | Adaptive color mode is used. The average color value of the color picking area is used as the mask color.|
+| Name | Description |
+| ------- | ----------- |
+| Default | Adaptive color mode is not used. The default color is used as the mask color.|
+| Average | Adaptive color mode is used. The average color value of the color picking area is used as the mask color.|
## TextHeightAdaptivePolicy10+
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-button.md b/en/application-dev/reference/arkui-ts/ts-basic-components-button.md
index de00ad6ba70f1ddb0cf8bff57e2f8ef7bfec26cf..7339314e264130287248efd6e5e5a2e696a726e7 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-button.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-button.md
@@ -47,7 +47,7 @@ Since API version 9, this API is supported in ArkTS widgets.
| stateEffect | boolean | Whether to enable the pressed effect on the click of the button. The value **false** means to disable the pressed effect. Default value: **true** Since API version 9, this API is supported in ArkTS widgets.|
| labelStyle10+ | [LabelStyle](#labelstyle10) | Label style of the button.|
-## ButtonType enums
+## ButtonType
Since API version 9, this API is supported in ArkTS widgets.
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 4b8520cfa0e7a2b173eda68caa17d379f5c42759..e1e0af8f5fa486e762f569c7a9f1f628147f9e64 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
@@ -17,7 +17,7 @@ PanGesture(value?: { fingers?: number; direction?: PanDirection; distance?: numb
| 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**|
+| fingers | number | No| Minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10. Default value: **1** Value range: 1 to 10 **NOTE** If the value is less than 1 or is not set, the default value is used.|
| 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](ts-container-tabs.md) swipe occur at the same time, set **distance** to **1** so that the gesture can be more easily recognized.|
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-gestures-tapgesture.md b/en/application-dev/reference/arkui-ts/ts-basic-gestures-tapgesture.md
index 03109744f1cdc09ed7b2d9f7d7687db8944f602f..ef9a851b418959eeb04ed06675815d82a9bd7dc4 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-gestures-tapgesture.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-gestures-tapgesture.md
@@ -1,6 +1,6 @@
# TapGesture
-**TapGesture** is used to trigger a tap gesture with one or more taps.
+**TapGesture** is used to trigger a tap gesture with one, two, or more taps.
> **NOTE**
>
@@ -15,8 +15,8 @@ TapGesture(value?: { count?: number, fingers?: number })
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
-| count | number | No| Number of consecutive taps. If this parameter is set to a value less than **1**, the default value will be used. Default value: **1** > **NOTE** > If multi-tap is configured, the timeout interval between a lift and the next tap is 300 ms.|
-| fingers | number | No| Number of fingers required to trigger a tap. The value ranges from 1 to 10. Default value: **1** > **NOTE** > 1. When multi-finger is configured, the gesture will fail to be recognized if the number of fingers used for tapping is less than the configured number within 300 ms of tapping by the first finger. > 2. The gesture will fail to be recognized if the number of fingers used for tapping exceeds the configured number.|
+| count | number | No| Number of consecutive taps. If the value is less than 1 or is not set, the default value is used. Default value: **1** **NOTE** If multi-tap is configured, the timeout interval between a lift and the next tap is 300 ms.|
+| fingers | number | No| Number of fingers required to trigger a tap. The value ranges from 1 to 10. If the value is less than 1 or is not set, the default value is used. Default value: **1** **NOTE** 1. When multi-finger is configured, if the number of fingers used for tap does not reach the specified number within 300 ms after the first finger is tapped, the gesture fails to be recognized. 2. Gesture recognition fails if the number of fingers used for tap exceeds the configured number.|
## Events
diff --git a/en/application-dev/reference/arkui-ts/ts-container-gridrow.md b/en/application-dev/reference/arkui-ts/ts-container-gridrow.md
index 9b246e8755e9df19c31546666cc74720f9cc3798..8f8f691d44dc7705919c9928515ba39cc40f199d 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-gridrow.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-gridrow.md
@@ -126,7 +126,11 @@ A grid supports a maximum of six breakpoints: xs, sm, md, lg, xl and xxl, whose
## Attributes
-The [universal attributes](ts-universal-attributes-size.md) are supported.
+In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported.
+
+| Name | Type | Description |
+| ----------------------- | ----------------------------------- | ------------------------------------------- |
+| alignItems10+ | [ItemAlign](ts-appendix-enums.md#itemalign) | Alignment mode of the **\** cross axis. Default value: **ItemAlign.Start** **NOTE** The alignment mode of the **\** component can also be set using **alignSelf([ItemAlign](ts-appendix-enums.md#itemalign))**. If both of the preceding methods are used, the setting of **alignSelf(ItemAlign)** prevails. Since API version 10, this API is supported in ArkTS widgets.|
## Events
diff --git a/en/application-dev/reference/arkui-ts/ts-container-list.md b/en/application-dev/reference/arkui-ts/ts-container-list.md
index 9efd6ab6e939ee495789cde41a294e15da37a3a7..09d9024fb37381dfd67e4bf34688092d94c491fb 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-list.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-list.md
@@ -183,7 +183,7 @@ struct ListLanesExample {
.lanes({ minLength: 40, maxLength: 40 })
.alignListItem(this.alignListItem)
- Button("Change alignListItem: "+ this.alignListItem).onClick(() => {
+ Button("Click to modify alignListItem: "+ this.alignListItem).onClick(() => {
if (this.alignListItem == ListItemAlign.Start) {
this.alignListItem = ListItemAlign.Center
} else if (this.alignListItem == ListItemAlign.Center) {
diff --git a/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md b/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md
index 6dc3c53496053d90595a0fab3010759250e9acb9..86400597c389b6b30ec1dff940b657e53e25ca26 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md
@@ -22,7 +22,7 @@ SideBarContainer( type?: SideBarContainerType )
| -------- | -------- | -------- | -------- |
| type | SideBarContainerType | No| Display type of the sidebar. Default value: **SideBarContainerType.Embed**|
-## SideBarContainerType enums
+## SideBarContainerType
| Name| Description|
| -------- | -------- |
diff --git a/en/application-dev/reference/arkui-ts/ts-motion-path-animation.md b/en/application-dev/reference/arkui-ts/ts-motion-path-animation.md
index 37f51638b8383dfab8aba2ddb3f6e7c441419b8a..fd98aadd3525b1d6d37262125bdc544833e9d129 100644
--- a/en/application-dev/reference/arkui-ts/ts-motion-path-animation.md
+++ b/en/application-dev/reference/arkui-ts/ts-motion-path-animation.md
@@ -11,7 +11,7 @@ The motion path animation is used to animate a component along a custom path.
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
-| motionPath | { path: string, from?: number, to?: number, rotatable?: boolean } **NOTE** In a path, **start** and **end** can be used to replace the start point and end point. Example: 'Mstart.x start.y L50 50 Lend.x end.y Z' For more information, see [Path Drawing](../../ui/ui-js-components-svg-path.md).| { '', 0.0, 1.0, false } | Motion path of the component. - **path**: motion path of the translation animation. The value is an SVG path string. - **from**: start point of the motion path. The default value is **0.0**. - **to**: end point of the motion path. The default value is **1.0**. - **rotatable**: whether to rotate along the path.|
+| motionPath | { path: string, from?: number, to?: number, rotatable?: boolean } **NOTE** In a path, **start** and **end** can be used to replace the start point and end point. Example: 'Mstart.x start.y L50 50 Lend.x end.y Z' For more information, see [Path Drawing](../../ui/ui-js-components-svg-path.md).| { '', 0.0, 1.0, false } | Motion path of the component. - **path**: motion path of the translation animation. The value is an SVG path string. - **from**: start point of the motion path. Default value: **0.0** Value range: [0, 1] A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**. - **to**: end point of the motion path. Default value: **1.0** Value range: [0, 1] A value less than 0 evaluates to the value **0**. A value larger than 1 evaluates to the value **1**. - **rotatable**: whether to rotate along the path. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-page-transition-animation.md b/en/application-dev/reference/arkui-ts/ts-page-transition-animation.md
index fe419d713fe257eb593064363f8e1e8d1afe0e92..5cd36a45df7a1b6720be03d6ca9fe59d5f555cbf 100644
--- a/en/application-dev/reference/arkui-ts/ts-page-transition-animation.md
+++ b/en/application-dev/reference/arkui-ts/ts-page-transition-animation.md
@@ -1,6 +1,6 @@
# Page Transition
-The page transition navigates users between pages. You can customize page transitions by configuring the page entrance and exit components in the global **pageTransition** API.
+The page transition navigates users between pages. You can customize page transitions by configuring the page entrance and exit components in the **pageTransition** API.
> **NOTE**
>
@@ -8,12 +8,12 @@ The page transition navigates users between pages. You can customize page transi
>
-| Name | Parameter | Description |
-| ------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| PageTransitionEnter | { type?: RouteType, duration?: number, curve?: [Curve](ts-appendix-enums.md#curve) \| string, delay?: number } | Page entrance animation. - **type**: route type for the page transition effect to take effect. Default value: **RouteType.None** **Note**: If no match is found, the default page transition effect is used (which may vary according to the device). To disable the default page transition effect, set **duration** to **0**. - **duration**: animation duration, in milliseconds. - **curve**: animation curve. The value of the string type can be any of the following: "ease", "ease-in", "ease-out", "ease-in-out", "extreme-deceleration", "fast-out-linear-in", "fast-out-slow-in", "friction", "linear", "linear-out-slow-in", "rhythm", "sharp", "smooth". Default value: **Curve.Linear** - **delay**: animation delay, in milliseconds. By default, the animation is played without delay.|
-| PageTransitionExit | { type?: RouteType, duration?: number, curve?: [Curve](ts-appendix-enums.md#curve) \| string, delay?: number } | Page exit animation. - **type**: route type for the page transition effect to take effect. Default value: **RouteType.None** **Note**: If no match is found, the default page transition effect is used (which may vary according to the device). To disable the default page transition effect, set **duration** to **0**. - **duration**: animation duration, in milliseconds. - **curve**: animation curve. The value range of the string type is the same as that of **PageTransitionEnter**. Default value: **Curve.Linear** - **delay**: animation delay, in milliseconds. By default, the animation is played without delay.|
+| Name | Parameter | Mandatory| Description |
+| ------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| PageTransitionEnter | { type?: RouteType, duration?: number, curve?: [Curve](ts-appendix-enums.md#curve) \| string, delay?: number } | No | Page entrance animation. - **type**: route type for the page transition effect to take effect. Default value: **RouteType.None** **NOTE** If no match is found, the default page transition effect is used (which may vary according to the device). To disable the default page transition effect, set **duration** to **0**. - **duration**: animation duration. Unit: ms - **curve**: animation curve. The value of the string type can be any of the following: "ease", "ease-in", "ease-out", "ease-in-out", "extreme-deceleration", "fast-out-linear-in", "fast-out-slow-in", "friction", "linear", "linear-out-slow-in", "rhythm", "sharp", "smooth". Default value: **Curve.Linear** - **delay**: animation delay. Default value: **0** Unit: ms|
+| PageTransitionExit | { type?: RouteType, duration?: number, curve?: [Curve](ts-appendix-enums.md#curve) \| string, delay?: number } | No | Page exit animation. - **type**: route type for the page transition effect to take effect. Default value: **RouteType.None** **NOTE** If no match is found, the default page transition effect is used (which may vary according to the device). To disable the default page transition effect, set **duration** to **0**. - **duration**: animation duration, in milliseconds. - **curve**: animation curve. The value range of the string type is the same as that of **PageTransitionEnter**. Default value: **Curve.Linear** - **delay**: animation delay. Default value: **0** Unit: ms|
-## RouteType enums
+## RouteType
| Name| Description |
| ---- | ------------------------------------------------------------ |
@@ -28,7 +28,7 @@ The page transition navigates users between pages. You can customize page transi
| --------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| slide | [SlideEffect](#slideeffect) | No | Slide effect during page transition. Default value: **SlideEffect.Right**|
| translate | { x? : number \| string, y? : number \| string, z? : number \| string } | No | Translation effect during page transition, which is the value of the start point of entrance and the end point of exit. When this parameter is set together with **slide**, the latter takes effect by default. - **x**: translation distance along the x-axis. - **y**: translation distance along the y-axis. - **z**: translation distance along the y-axis.|
-| scale | { x? : number, y? : number, z? : number, centerX? : number \| string, centerY? : number \| string } | No | Scaling effect during page transition, which is the value of the start point of entrance and the end point of exit. - **x**: scale ratio along the x-axis. - **y**: scale ratio along the y-axis. - **z**: scale ratio along the z-axis. - **centerX** and **centerY**: scale center point. - If the center point is 0, it refers to the upper left corner of the component. |
+| scale | { x? : number, y? : number, z? : number, centerX? : number \| string, centerY? : number \| string } | No | Scaling effect during page transition, which is the value of the start point of entrance and the end point of exit. - **x**: scale ratio along the x-axis. - **y**: scale ratio along the y-axis. - **z**: scale ratio along the z-axis. - **centerX** and **centerY**: scale center point. - If the center point is 0, it refers to the upper left corner of the component. |
| opacity | number | No | Opacity, which is the opacity value of the start point of entrance or the end point of exit. Default value: **1**|
## SlideEffect
@@ -43,10 +43,10 @@ The page transition navigates users between pages. You can customize page transi
## Events
-| Name | Description |
+| Name | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| onEnter(event: (type?: RouteType, progress?: number) => void) | The callback input parameter is the normalized progress of the current entrance animation. The value range is 0–1. - **type**: route type. - **progress**: current progress.|
-| onExit(event: (type?: RouteType, progress?: number) => void) | The callback input parameter is the normalized progress of the current exit animation. The value range is 0–1. - **type**: route type. - **progress**: current progress.|
+| onEnter(event: (type?: RouteType, progress?: number) => void) | Invoked once every animation frame until the entrance animation ends, when the value of **progress** changes from 0 to 1. The input parameter is the normalized progress of the current entrance animation. The value range is 0–1. - **type**: route type. - **progress**: current progress. |
+| onExit(event: (type?: RouteType, progress?: number) => void) | Invoked once every animation frame until the exit animation ends, when the value of **progress** changes from 0 to 1. The input parameter is the normalized progress of the current exit animation. The value range is 0–1. - **type**: route type. - **progress**: current progress. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-transition-animation-component.md b/en/application-dev/reference/arkui-ts/ts-transition-animation-component.md
index 7c62710b64759d42e205eb91b010fb50e478e108..cd072648a81f68b080ae88b9a90cf6a157376dc6 100644
--- a/en/application-dev/reference/arkui-ts/ts-transition-animation-component.md
+++ b/en/application-dev/reference/arkui-ts/ts-transition-animation-component.md
@@ -12,17 +12,17 @@ Configure the component transition animations for when a component is inserted o
| Name| Type| Description|
| -------- | -------- | -------- |
-| transition | TransitionOptions | Transition parameters, which are all optional. For details, see **TransitionOptions**.|
+| transition | TransitionOptions | Transition effects when the component is inserted, displayed, deleted, or hidden. If no transition effect is set, an opacity transition from 0 to 1 is applied. Since API version 9, this API is supported in ArkTS widgets. **NOTE** Transition parameters, which are all optional. For details, see **TransitionOptions**.|
## TransitionOptions
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
-| type | [TransitionType](ts-appendix-enums.md#transitiontype) | No| Transition type, which includes component addition and deletion by default. Default value: **TransitionType.All** **NOTE** If **type** is not specified, insertion and deletion use the same transition type.|
-| opacity | number | No| Opacity of the component during transition, which is the value of the start point of insertion and the end point of deletion. Default value: **1**|
-| translate | { x? : number \| string, y? : number \| string, z? : number \| string } | No| Translation of the component during transition, which is the value of the start point of insertion and the end point of deletion. -**x**: distance to translate along the x-axis. -**y**: distance to translate along the y-axis. -**z**: distance to translate along the z-axis.|
-| scale | { x? : number, y? : number, z? : number, centerX? : number \| string, centerY? : number \| string } | No| Scaling of the component during transition, which is the value of the start point of insertion and the end point of deletion. - **x**: scale factor along the x-axis. - **y**: scale factor along the y-axis. - **z**: scale factor along the z-axis. - **centerX** and **centerY**: x coordinate and y coordinate of the scale center, respectively. The default values are both **"50%"**. - If the center point is 0, it indicates the upper left corner of the component. |
-| rotate | { x?: number, y?: number, z?: number, angle?: number \| string, centerX?: number \| string, centerY?: number \| string } | No| Rotation of the component during transition, which is the value of the start point of insertion and the end point of deletion. - **x**: rotation vector along the x-axis. - **y**: rotation vector along the y-axis. - **z**: rotation vector along the z-axis. - **centerX** and **centerY**: x coordinate and y coordinate of the rotation center, respectively. The default values are both **"50%"**. - If the center point is (0, 0), it indicates the upper left corner of the component.|
+| type | [TransitionType](ts-appendix-enums.md#transitiontype) | No| Transition type, which includes component addition and deletion by default. Default value: **TransitionType.All** Since API version 9, this API is supported in ArkTS widgets. **NOTE** If **type** is not specified, insertion and deletion use the same transition type.|
+| opacity | number | No| Opacity of the component during transition, which is the value of the start point of insertion and the end point of deletion. Default value: **1** Value range: [0, 1] Since API version 9, this API is supported in ArkTS widgets. **NOTE** A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.|
+| translate | { x? : number \| string, y? : number \| string, z? : number \| string } | No| Translation of the component during transition, which is the value of the start point of insertion and the end point of deletion. -**x**: distance to translate along the x-axis. -**y**: distance to translate along the y-axis. -**z**: distance to translate along the z-axis. Since API version 9, this API is supported in ArkTS widgets.|
+| scale | { x? : number, y? : number, z? : number, centerX? : number \| string, centerY? : number \| string } | No| Scaling of the component during transition, which is the value of the start point of insertion and the end point of deletion. - **x**: scale factor along the x-axis. - **y**: scale factor along the y-axis. - **z**: scale factor along the z-axis. - **centerX** and **centerY**: x coordinate and y coordinate of the scale center, respectively. The default values are both **"50%"**. - If the center point is 0, it indicates the upper left corner of the component. Since API version 9, this API is supported in ArkTS widgets.|
+| rotate | { x?: number, y?: number, z?: number, angle?: number \| string, centerX?: number \| string, centerY?: number \| string } | No| Rotation of the component during transition, which is the value of the start point of insertion and the end point of deletion. - **x**: rotation vector along the x-axis. - **y**: rotation vector along the y-axis. - **z**: rotation vector along the z-axis. - **centerX** and **centerY**: x coordinate and y coordinate of the rotation center, respectively. The default values are both **"50%"**. - If the center point is (0, 0), it indicates the upper left corner of the component. Since API version 9, this API is supported in ArkTS widgets.|
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-transition-animation-shared-elements.md b/en/application-dev/reference/arkui-ts/ts-transition-animation-shared-elements.md
index cd3f67300cfa8b63bac83b973dcb404590426d27..2fcbfe67f010ea80ca278932bf4210074d438878 100644
--- a/en/application-dev/reference/arkui-ts/ts-transition-animation-shared-elements.md
+++ b/en/application-dev/reference/arkui-ts/ts-transition-animation-shared-elements.md
@@ -1,6 +1,6 @@
-# Transition of Shared Elements
+# Shared Element Transition
-Shared element transition can be used for transition between pages, for example, transition from an image on the current page to the next page.
+A shared element transition is a transition animation applied to a component that is present on two pages. This component is called the shared element and can be set in the **sharedTransition** attribute.
> **NOTE**
>
@@ -10,14 +10,14 @@ Shared element transition can be used for transition between pages, for example,
## Attributes
-| Name | Parameters | Description |
+| Name | Parameter | Description |
| ---------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| sharedTransition | id: string, { duration?: number, curve?: Curve \| string, delay?: number, motionPath?: { path: string, form?: number, to?: number, rotatable?: boolean }, zIndex?: number, type?: [SharedTransitionEffectType](ts-appendix-enums.md#sharedtransitioneffecttype) } | Transition of the shared element. If the same **id** value is configured for a component on the two pages, this component is considered as a shared element of the pages. If the **id** value is an empty string, no transition will be applied to the component. - **id**: component ID. - **duration**: animation duration, in ms. The default duration is 1000 ms. - **curve**: animation curve. The default curve is **Linear**. For details about the valid values, see [Curve](ts-animatorproperty.md). - **delay**: Delay of animation playback, in ms. By default, the playback is not delayed. - **motionPath**: motion path information. For details, see [Motion Path Animation](ts-motion-path-animation.md). - **path**: path. - **from**: start value. - **to**: end value. - **rotatable**: whether to rotate. - **zIndex**: z-axis. - **type**: animation type.|
+| sharedTransition | id: string, { duration?: number, curve?: Curve \| string, delay?: number, motionPath?: { path: string, form?: number, to?: number, rotatable?: boolean }, zIndex?: number, type?: [SharedTransitionEffectType](ts-appendix-enums.md#sharedtransitioneffecttype) } | Transition of the shared element. If the same **id** value is configured for a component on the two pages, this component is considered as a shared element of the pages. If the **id** value is an empty string, no transition will be applied to the component. - **id**: component ID. - **duration**: animation duration. Default value: **1000** Unit: ms Value range: [0, +∞) The value **0** indicates that no animation is applied. A value less than 0 evaluates to the value **0**. - **curve**: animation curve. The default curve is **Linear**. For details about the valid values, see [Curve](ts-animatorproperty.md). - **delay**: animation delay. Default value: **0** Unit: ms Value range: [0, +∞) A value less than 0 evaluates to the value **0**. - **motionPath**: motion path information. For details, see [Motion Path Animation](ts-motion-path-animation.md). - **path**: path. - **from**: start value. - **to**: end value. - **rotatable**: whether to rotate. - **zIndex**: z-axis. - **type**: animation type.|
## Example
- The example implements the custom transition of a shared image during redirection from one page to another, which is triggered by a click on the image.
+This example implements the custom transition of a shared image during redirection from one page to another, which is triggered by a click on the image.
```ts
// xxx.ets
diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-location.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-location.md
index 37c96bd580acac247e9b7cbc51c7e30618ceb741..af2554cac67dd52793d48f5a3b0c059f70a21f2c 100644
--- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-location.md
+++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-location.md
@@ -14,7 +14,7 @@ The location attributes set the alignment mode, layout direction, and position o
| -------- | -------- | -------- |
| align | [Alignment](ts-appendix-enums.md#alignment) | Alignment mode of the component content in the drawing area. Default value: **Alignment.Center** Since API version 9, this API is supported in ArkTS widgets.|
| direction | [Direction](ts-appendix-enums.md#direction) | Horizontal layout of the component. Default value: **Direction.Auto** Since API version 9, this API is supported in ArkTS widgets.|
-| position | [Position](ts-types.md#position8) | Offset of the component's upper left corner relative to the parent component's upper left corner. This offset is expressed using absolute values. When laying out components, this attribute does not affect the layout of the parent component. It only adjusts the component position during drawing. Since API version 9, this API is supported in ArkTS widgets.|
+| position | [Position](ts-types.md#position8) | Offset of the component's upper left corner relative to the parent component's upper left corner. This offset is expressed using absolute values. When laying out components, this attribute does not affect the layout of the parent component. It only adjusts the component position during drawing. This attribute is applicable to scenarios where the component is fixed at a position in the parent container, for example, where it is pinned to top or floating above the UI. Since API version 9, this API is supported in ArkTS widgets.|
| markAnchor | [Position](ts-types.md#position8) | Anchor point of the component for positioning. The upper left corner of the component is used as the reference point for offset. Generally, this attribute is used together with the **position** and **offset** attributes. When used independently, this attribute is similar to **offset**. Default value: { x: 0, y: 0 } Since API version 9, this API is supported in ArkTS widgets.|
| offset | [Position](ts-types.md#position8) | Offset of the component relative to itself. This offset is expressed using relative values. This attribute does not affect the layout of the parent component. It only adjusts the component position during drawing. Default value: { x: 0, y: 0 } Since API version 9, this API is supported in ArkTS widgets.|
| alignRules9+ | { left?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) }; right?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) }; middle?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) }; top?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) }; bottom?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) }; center?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) } } | Alignment rules relative to the container. This attribute is valid only when the container is [\](ts-container-relativecontainer.md). - **left**: left-aligned. - **right**: right-aligned. - **middle**: center-aligned. - **top**: top-aligned. - **bottom**: bottom-aligned. - **center**: center-aligned. This API is supported in ArkTS widgets. **NOTE** - **anchor**: ID of the component that functions as the anchor point. - **align**: alignment mode relative to the anchor component.|
diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md
index 3d1b5395fe965496db2ba6f310a8860eb9419c5c..e9f1c5c337d47121ada8673d82f832f68a075134 100644
--- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md
+++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md
@@ -18,15 +18,23 @@ You can bind a popup to a component, specifying its content, interaction logic,
| Name | Type | Mandatory | Description |
| -------------------------| ------------------------------------------------| -----| ----------------------------------------- |
-| message | string | Yes | Content of the popup message. |
-| placementOnTop | boolean | No | Whether to display the popup above the component. Default value: **false** |
-| primaryButton | { value: string, action: () => void } | No | Primary button. **value**: text of the primary button in the popup. **action**: callback for clicking the primary button.|
-| secondaryButton | { value: string, action: () => void } | No | Secondary button. **value**: text of the secondary button in the popup. **action**: callback for clicking the secondary button.|
-| onStateChange | (event: { isVisible: boolean }) => void | No | Callback for the popup status change event. **isVisible**: whether the popup is visible. |
-| arrowOffset9+ | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup: The value **0** indicates that the arrow is located on the leftmost, and any other value indicates the distance from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward or rightward to stay within the safe area. When the value is **0**, the arrow always points to the bound component. |
-| showInSubWindow9+ | boolean | No | Whether to show the popup in the subwindow. Default value: **false** |
-| mask10+ | boolean \| [ResourceColor](ts-types.md#resourcecolor) | No | Whether to apply a mask to the popup. The value **true** means to apply a transparent mask to the popup, **false** means not to apply a mask to the popup, and a color value means to apply a mask in the corresponding color to the popup.|
-
+| message | string | Yes | Content of the popup message. |
+| placementOnTop | boolean | No | Whether to display the popup above the component. Default value: **false** |
+| primaryButton | { value: string, action: () => void } | No | Primary button. **value**: text of the primary button in the popup. **action**: callback for clicking the primary button.|
+| secondaryButton | { value: string, action: () => void } | No | Secondary button. **value**: text of the secondary button in the popup. **action**: callback for clicking the secondary button.|
+| onStateChange | (event: { isVisible: boolean }) => void | No | Callback for the popup status change event. **isVisible**: whether the popup is visible. |
+| arrowOffset9+ | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup: The value **0** indicates that the arrow is located on the leftmost, and any other value indicates the distance from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward or rightward to stay within the safe area. When the value is **0**, the arrow always points to the bound component. |
+| showInSubWindow9+ | boolean | No | Whether to show the popup in the subwindow. Default value: **false** |
+| mask10+ | boolean \| [ResourceColor](ts-types.md#resourcecolor) | No | Whether to apply a mask to the popup. The value **true** means to apply a transparent mask to the popup, **false** means not to apply a mask to the popup, and a color value means to apply a mask in the corresponding color to the popup.|
+| messageOptions10+ | [PopupMessageOptions](#popupmessageoptions10) | No | Parameters of the popup message.|
+| targetSpace10+ | [Length](ts-types.md#length) | No | Space between the popup and the target.|
+
+## PopupMessageOptions10+
+
+| Name | Type | Mandatory| Description |
+| --------- | ------------------------------------------ | ---- | ---------------------- |
+| textColor | [ResourceColor](ts-types.md#resourcecolor) | No | Text color of the popup message.|
+| font | [Font](ts-types.md#Font) | No | Font attributes of the popup message.|
## CustomPopupOptions8+
| Name | Type | Mandatory | Description |
@@ -34,13 +42,13 @@ You can bind a popup to a component, specifying its content, interaction logic,
| builder | [CustomBuilder](ts-types.md#custombuilder8) | Yes | Popup builder. |
| placement | [Placement](ts-appendix-enums.md#placement8) | No | Preferred position of the popup. If the set position is insufficient for holding the popup, it will be automatically adjusted. Default value: **Placement.Bottom** |
| popupColor | [ResourceColor](ts-types.md#resourcecolor) | No | Color of the popup. |
-| enableArrow | boolean | No | Whether to display an arrow. Since API version 9, if the position set for the popup is not large enough, the arrow will not be displayed. For example, if **placement** is set to **Left** but the popup height is less than twice the arrow width (64 vp), the arrow will not be displayed. Default value: **true**|
+| enableArrow | boolean | No | Whether to display an arrow. Since API version 9, if the position set for the popup is not large enough, the arrow will not be displayed. For example, if **placement** is set to **Left**, but the popup height (80 vp) is less than the sum of the arrow width (32 vp) and diameter of popup rounded corner (48 vp), the arrow will not be displayed. Default value: **true**|
| autoCancel | boolean | No | Whether to automatically close the popup when an operation is performed on the page. Default value: **true** |
| onStateChange | (event: { isVisible: boolean }) => void | No | Callback for the popup status change event. **isVisible**: whether the popup is visible. |
| arrowOffset9+ | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup: The value **0** indicates that the arrow is located on the leftmost, and any other value indicates the distance from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward or rightward to stay within the safe area. When the value is **0**, the arrow always points to the bound component. |
| showInSubWindow9+ | boolean | No | Whether to show the popup in the subwindow. Default value: **false** |
| mask10+ | boolean \| [ResourceColor](ts-types.md#resourcecolor) | No| Whether to apply a mask to the popup. The value **true** means to apply a transparent mask to the popup, **false** means not to apply a mask to the popup, and a color value means to apply a mask in the corresponding color to the popup.|
-
+| targetSpace10+ | [Length](ts-types.md#length) | No| Space between the popup and the target.|
## Example
```ts
diff --git a/en/application-dev/reference/errorcodes/errorcode-webview.md b/en/application-dev/reference/errorcodes/errorcode-webview.md
index d298583a7e63749b6ff5bdfe4548fe26422887e5..de75c73269bcad4b4777c237b729543bc871b24d 100644
--- a/en/application-dev/reference/errorcodes/errorcode-webview.md
+++ b/en/application-dev/reference/errorcodes/errorcode-webview.md
@@ -4,7 +4,6 @@
>
> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
-
## 17100001 WebviewController Not Associated with a Web Component
**Error Message**
@@ -229,3 +228,41 @@ The related JS database API is not used.
1. Check whether the JS database API is used.
2. If the JS database API is used, find out the failure cause, for example, check whether **databaseAccess** is enabled.
+
+
+## 17100013 Memory Allocation Failure
+
+**Error Message**
+
+New failed, out of memeory.
+
+**Description**
+
+Memory allocation failed due to insufficient memory.
+
+**Possible Causes**
+
+The data to send is too large.
+
+**Solution**
+
+Check the length of the data to be sent.
+
+
+## 17100014 Type and Value Mismatch
+
+**Error Message**
+
+The type does not match with the value of the message.
+
+**Description**
+
+The type and value of the message do not match.
+
+**Possible Causes**
+
+The value of the obtained message does not match the type of the message.
+
+**Solution**
+
+Call the API based on the message type to obtain the message value. For example, if the type is **BOOLEAN**, call the **GetBoolean** API to obtain the Boolean value.
diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md
new file mode 100644
index 0000000000000000000000000000000000000000..a9ad760a1c58f12e013d2a7a9feeee6240cd37d2
--- /dev/null
+++ b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelog-web.md
@@ -0,0 +1,33 @@
+# Web Subsystem Changelog
+
+Compared with earlier versions, OpenHarmony 4.0.6.1 has the following API changes in its web subsystem:
+
+## cl.web.1 Parameters in createWebMessagePorts
+
+Added an optional parameter to the **WebMessagePort** API to accommodate more data types.
+
+**Change Impact**
+
+None (The added parameter is optional, and the API is forward compatible.)
+
+**Key API/Component Changes**
+
+- Involved APIs:
+
+ createWebMessagePorts(): Array\;
+
+- Before change:
+
+ ```ts
+ createWebMessagePorts(): Array;
+ ```
+
+- After change:
+
+ ```ts
+ createWebMessagePorts(isExtentionType?: boolean): Array;
+ ```
+
+**Adaptation Guide**
+
+N/A
diff --git a/zh-cn/application-dev/application-models/Readme-CN.md b/zh-cn/application-dev/application-models/Readme-CN.md
index f8cb3805a1b9463655111a1e2c7d5a9934ac5e31..1e72b5673a150e73184db163ddc5ad79005ec8f6 100644
--- a/zh-cn/application-dev/application-models/Readme-CN.md
+++ b/zh-cn/application-dev/application-models/Readme-CN.md
@@ -17,11 +17,37 @@
- ExtensionAbility组件
- [ExtensionAbility组件概述](extensionability-overview.md)
- [ServiceExtensionAbility](serviceextensionability.md)
+ - [DataShareExtensionAbility(仅对系统应用开放)](datashareextensionability.md)
- [AccessibilityExtensionAbility](accessibilityextensionability.md)
- [EnterpriseAdminExtensionAbility](enterprise-extensionAbility.md)
- [InputMethodExtensionAbility](inputmethodextentionability.md)
- [WindowExtensionAbility](windowextensionability.md)
- - [服务卡片开发指导](widget-development-stage.md)
+ - 服务卡片开发指导(Stage模型)
+ - [服务卡片概述](service-widget-overview.md)
+ - 开发基于ArkTS UI的卡片
+ - [ArkTS卡片运行机制](arkts-ui-widget-working-principles.md)
+ - [ArkTS卡片相关模块](arkts-ui-widget-modules.md)
+ - ArkTS卡片开发指导
+ - [创建一个ArkTS卡片](arkts-ui-widget-creation.md)
+ - [配置卡片的配置文件](arkts-ui-widget-configuration.md)
+ - [卡片生命周期管理](arkts-ui-widget-lifecycle.md)
+ - 开发卡片页面
+ - [卡片页面能力说明](arkts-ui-widget-page-overview.md)
+ - [卡片使用动效能力](arkts-ui-widget-page-animation.md)
+ - [卡片使用自定义绘制能力](arkts-ui-widget-page-custom-drawing.md)
+ - 开发卡片事件
+ - [卡片事件能力说明](arkts-ui-widget-event-overview.md)
+ - [通过FormExtensionAbility刷新卡片内容](arkts-ui-widget-event-formextensionability.md)
+ - [通过UIAbility刷新卡片内容](arkts-ui-widget-event-uiability.md)
+ - [使用router事件跳转到指定页面](arkts-ui-widget-event-router.md)
+ - 卡片数据交互
+ - [卡片数据交互说明](arkts-ui-widget-interaction-overview.md)
+ - [定时刷新和定点刷新](arkts-ui-widget-update-by-time.md)
+ - [刷新本地图片和网络图片](arkts-ui-widget-image-update.md)
+ - [根据卡片状态刷新不同内容](arkts-ui-widget-update-by-status.md)
+ - [使用方刷新卡片内容(仅对系统应用开放)](arkts-ui-widget-content-update.md)
+ - [开发基于JS UI的卡片](js-ui-widget-development.md)
+ - [Stage模型服务卡片相关实例](service-widget-development-samples.md)
- [AbilityStage组件容器](abilitystage.md)
- [应用上下文Context](application-context-stage.md)
- 信息传递载体Want
diff --git a/zh-cn/application-dev/application-models/arkts-ui-widget-interaction-overview.md b/zh-cn/application-dev/application-models/arkts-ui-widget-interaction-overview.md
index 947af74c94943117de9fdd59b7bd9c1e6d210ef5..dc785d9c544b324faab02dc4a0666fa4e096e9a6 100644
--- a/zh-cn/application-dev/application-models/arkts-ui-widget-interaction-overview.md
+++ b/zh-cn/application-dev/application-models/arkts-ui-widget-interaction-overview.md
@@ -1,7 +1,7 @@
# 卡片数据交互说明
-ArkTS卡片框架提供了updateForm()接口和requestForm()接口主动触发卡片的页面刷新。**(介绍下LocalStorageProp在这个过程中起到的作用)**
+ArkTS卡片框架提供了updateForm()接口和requestForm()接口主动触发卡片的页面刷新。
![WidgetLocalStorageProp](figures/WidgetLocalStorageProp.png)
diff --git a/zh-cn/application-dev/application-models/extensionability-overview.md b/zh-cn/application-dev/application-models/extensionability-overview.md
index 0994ac74ce86b1dfbc860d7be232151efdf6201e..573d15e25f24a1d9275b8582717e3e58a4956380 100644
--- a/zh-cn/application-dev/application-models/extensionability-overview.md
+++ b/zh-cn/application-dev/application-models/extensionability-overview.md
@@ -46,7 +46,7 @@ ExtensionAbility组件是基于特定场景(例如服务卡片、输入法等
## 实现指定类型的ExtensionAbility组件
-以实现卡片[FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md)为例进行说明。卡片框架提供了[FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md)基类,开发者通过派生此基类(如MyFormExtensionAbility),实现回调(如创建卡片的onCreate()回调、更新卡片的onUpdateForm()回调等)来实现具体卡片功能,具体见开发指导见[服务卡片FormExtensionAbility](widget-development-stage.md)。
+以实现卡片[FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md)为例进行说明。卡片框架提供了[FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md)基类,开发者通过派生此基类(如MyFormExtensionAbility),实现回调(如创建卡片的onCreate()回调、更新卡片的onUpdateForm()回调等)来实现具体卡片功能,具体见开发指导见[服务卡片FormExtensionAbility](service-widget-overview.md)。
卡片FormExtensionAbility实现方不用关心使用方何时去请求添加、删除卡片,FormExtensionAbility实例及其所在的ExtensionAbility进程的整个生命周期,都是由卡片管理系统服务FormManagerService进行调度管理。
diff --git a/zh-cn/application-dev/application-models/js-ui-widget-development.md b/zh-cn/application-dev/application-models/js-ui-widget-development.md
index e66332d72ff4ffdc0bcbec2b060bef21db98dafe..34a0af5ea36388dfbfa74b22f26581d192110e82 100644
--- a/zh-cn/application-dev/application-models/js-ui-widget-development.md
+++ b/zh-cn/application-dev/application-models/js-ui-widget-development.md
@@ -57,13 +57,6 @@ FormExtensionAbility类拥有如下API接口,具体的API介绍详见[接口
| onConfigurationUpdate(config: Configuration): void | 当系统配置更新时调用。 |
| onShareForm?(formId: string): { [key: string]: any } | 卡片提供方接收卡片分享的通知接口。 |
-FormExtensionAbility类还拥有成员context,为FormExtensionContext类,具体的API介绍详见[接口文档](../reference/apis/js-apis-inner-application-formExtensionContext.md)。
-
-| 接口名 | 描述 |
-| -------- | -------- |
-| startAbility(want: Want, callback: AsyncCallback<void>): void | 回调形式拉起一个卡片所属应用的UIAbility(系统接口,三方应用不支持调用,需申请后台拉起权限)。 |
-| startAbility(want: Want): Promise<void> | Promise形式拉起一个卡片所属应用的UIAbility(系统接口,三方应用不支持调用,需申请后台拉起权限)。 |
-
formProvider类有如下API接口,具体的API介绍详见[接口文档](../reference/apis/js-apis-app-form-formProvider.md)。
| 接口名 | 描述 |
@@ -324,7 +317,7 @@ export default class EntryFormAbility extends FormExtension {
}
```
-具体的持久化方法可以参考[轻量级数据存储开发指导](../database/database-preference-guidelines.md)。
+具体的持久化方法可以参考[轻量级数据存储开发指导](../database/app-data-persistence-overview.md)。
需要注意的是,卡片使用方在请求卡片时传递给提供方应用的Want数据中存在临时标记字段,表示此次请求的卡片是否为临时卡片:
diff --git a/zh-cn/application-dev/application-models/service-widget-overview.md b/zh-cn/application-dev/application-models/service-widget-overview.md
index 2df4807cdec519a0dab3f79cd40c12b2a42c015f..fa58595b04ff56145b7f11f8df3dd32e69ec306a 100644
--- a/zh-cn/application-dev/application-models/service-widget-overview.md
+++ b/zh-cn/application-dev/application-models/service-widget-overview.md
@@ -54,14 +54,3 @@ ArkTS卡片与JS卡片具备不同的实现原理及特征,在场景能力上
| 逻辑代码执行(不包含import能力) | 不支持 | 支持 |
相比于JS卡片,ArkTS卡片在能力和场景方面更加丰富,因此无论开发何种用途的卡片,都推荐使用ArkTS卡片,因为它可以提高开发效率并实现动态化。但如果只需要做静态页面展示的卡片,可以考虑使用JS卡片。
-
-## 限制
-
-为了降低FormExtensionAbility能力被三方应用滥用的风险,在FormExtensionAbility中限制以下接口的调用
-
-- @ohos.ability.particleAbility.d.ts
-- @ohos.backgroundTaskManager.d.ts
-- @ohos.resourceschedule.backgroundTaskManager.d.ts
-- @ohos.multimedia.camera.d.ts
-- @ohos.multimedia.audio.d.ts
-- @ohos.multimedia.media.d.ts
\ No newline at end of file
diff --git a/zh-cn/application-dev/application-models/widget-development-stage.md b/zh-cn/application-dev/application-models/widget-development-stage.md
deleted file mode 100644
index 646353f831080dbc13d430e046efa592d91e22f5..0000000000000000000000000000000000000000
--- a/zh-cn/application-dev/application-models/widget-development-stage.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# 服务卡片开发指导(Stage模型)
-
-
-
-[服务卡片概述](service-widget-overview.md)
-
-开发基于ArkTS UI的卡片
-
-- [ArkTS卡片运行机制](arkts-ui-widget-working-principles.md)
-- [ArkTS卡片相关模块](arkts-ui-widget-modules.md)
-- ArkTS卡片开发指导
- - [创建一个ArkTS卡片](arkts-ui-widget-creation.md)
- - [配置卡片的配置文件](arkts-ui-widget-configuration.md)
- - [卡片生命周期管理](arkts-ui-widget-lifecycle.md)
- - 开发卡片页面
- - [卡片页面能力说明](arkts-ui-widget-page-overview.md)
- - [卡片使用动效能力](arkts-ui-widget-page-animation.md)
- - [卡片使用自定义绘制能力](arkts-ui-widget-page-custom-drawing.md)
- - 开发卡片事件
- - [卡片事件能力说明](arkts-ui-widget-event-overview.md)
- - [通过FormExtensionAbility刷新卡片内容](arkts-ui-widget-event-formextensionability.md)
- - [通过UIAbility刷新卡片内容](arkts-ui-widget-event-uiability.md)
- - [使用router事件跳转到指定页面](arkts-ui-widget-event-router.md)
- - 卡片数据交互
- - [卡片数据交互说明](arkts-ui-widget-interaction-overview.md)
- - [定时刷新和定点刷新](arkts-ui-widget-update-by-time.md)
- - [刷新本地图片和网络图片](arkts-ui-widget-image-update.md)
- - [根据卡片状态刷新不同内容](arkts-ui-widget-update-by-status.md)
- - [使用方刷新卡片内容(仅对系统应用开放)](arkts-ui-widget-content-update.md)
-
-[开发基于JS UI的卡片](js-ui-widget-development.md)
-
-[Stage模型服务卡片相关实例](service-widget-development-samples.md)
\ No newline at end of file
diff --git a/zh-cn/application-dev/file-management/app-sandbox-directory.md b/zh-cn/application-dev/file-management/app-sandbox-directory.md
index 6aeb6746d3c50aac2c44d168507a5512b414c253..f0724bdefac2eacbe3adbec572d27a237ba77c50 100644
--- a/zh-cn/application-dev/file-management/app-sandbox-directory.md
+++ b/zh-cn/application-dev/file-management/app-sandbox-directory.md
@@ -70,7 +70,7 @@
| distributedfiles | distributedFilesDir | 分布式文件路径 | 应用在el2加密条件下存放分布式文件的目录,应用将文件放入该目录可分布式跨设备直接访问;随应用卸载而清理。 |
| files | filesDir | 应用通用文件路径 | 应用在本设备内部存储上通用的存放默认长期保存的文件路径;随应用卸载而清理。 |
| cache | cacheDir | 应用缓存文件路径 | 应用在本设备内部存储上用于缓存下载的文件或可重新生成的缓存文件的路径,应用cache目录大小超过配额或者系统空间达到一定条件,自动触发清理该目录下文件;用户通过系统空间管理类应用也可能触发清理该目录。应用需判断文件是否仍存在,决策是否需重新缓存该文件。 |
- | preferences | preferencesDir | 应用首选项文件路径 | 应用在本设备内部存储上通过数据库API存储配置类或首选项的目录;随应用卸载而清理。 |
+ | preferences | preferencesDir | 应用首选项文件路径 | 应用在本设备内部存储上通过数据库API存储配置类或首选项的目录;应用在本设备内部存储上通过数据库API存储配置类或首选项的目录;随应用卸载而清理。详见[通过用户首选项实现数据持久化](../database/data-persistence-by-preferences.md)。 |
| temp | tempDir | 应用临时文件路径 | 应用在本设备内部存储上仅在应用运行期间产生和需要的文件,应用退出后即清理。 |
对于上述各类应用文件路径,常见使用场景如下:
diff --git a/zh-cn/application-dev/file-management/file-management-overview.md b/zh-cn/application-dev/file-management/file-management-overview.md
index 350f8ae54667c489f23a8ff939819f465c208a2c..212697e0904ca1798c1d2804aff1f9ec910a2909 100644
--- a/zh-cn/application-dev/file-management/file-management-overview.md
+++ b/zh-cn/application-dev/file-management/file-management-overview.md
@@ -2,7 +2,7 @@
在操作系统中,存在各种各样的数据,按数据结构可分为:
-- 结构化数据:能够用统一的数据模型加以描述的数据。常见的是各类数据库数据。在应用开发中,对结构化数据的开发活动隶属于数据管理模块。
+- 结构化数据:能够用统一的数据模型加以描述的数据。常见的是各类数据库数据。在应用开发中,对结构化数据的开发活动隶属于[数据管理模块](../database/data-mgmt-overview.md)。
- 非结构化数据:指数据结构不规则或不完整,没有预定义的数据结构/模型,不方便用数据库二维逻辑表来表现的数据。常见的是各类文件,如文档、图片、音频、视频等。在应用开发中,对非结构化数据的开发活动隶属于文件管理模块,将在下文展开介绍。
diff --git a/zh-cn/application-dev/file-management/set-security-label.md b/zh-cn/application-dev/file-management/set-security-label.md
index e2448bebb298661d8997540066381fbc40268a75..839495ade751e039f4a830f6109bf4b2d481bdee 100644
--- a/zh-cn/application-dev/file-management/set-security-label.md
+++ b/zh-cn/application-dev/file-management/set-security-label.md
@@ -1,6 +1,6 @@
# 设置分布式文件数据等级
-不同设备本身的安全能力差异较大,一些小的嵌入式设备安全能力远弱于平板等设备类型。用户或者应用不同的文件数据有不同安全诉求,例如个人的健康信息和银行卡信息等不期望被弱设备读取。因此,OpenHarmony提供一套完整的数据分级、设备分级标准,并针对不同设备制定不同的数据流转策略。
+不同设备本身的安全能力差异较大,一些小的嵌入式设备安全能力远弱于平板等设备类型。用户或者应用不同的文件数据有不同安全诉求,例如个人的健康信息和银行卡信息等不期望被弱设备读取。因此,OpenHarmony提供一套完整的数据分级、设备分级标准,并针对不同设备制定不同的数据流转策略,具体规则请参见[数据、设备安全分级](../database/access-control-by-device-and-data-level.md)。
## 接口说明
diff --git a/zh-cn/application-dev/media/camera-recording.md b/zh-cn/application-dev/media/camera-recording.md
index 0ea40fba30eacc9c3027ac27844cc448fcea7f6c..dd82b50cbbb133eb075d9414a92a717a9ae1413e 100644
--- a/zh-cn/application-dev/media/camera-recording.md
+++ b/zh-cn/application-dev/media/camera-recording.md
@@ -26,6 +26,14 @@
console.info(`createAVRecorder fail, error:${error}`);
}
});
+ // AVRecorderConfig可参考下一章节
+ AVRecorder.prepare(AVRecorderConfig, (err) => {
+ if (err == null) {
+ console.log('prepare success');
+ } else {
+ console.log('prepare failed and error is ' + err.message);
+ }
+ })
let videoSurfaceId = null;
AVRecorder.getInputSurface().then((surfaceId) => {
diff --git a/zh-cn/application-dev/quick-start/Readme-CN.md b/zh-cn/application-dev/quick-start/Readme-CN.md
index da18cd93dd0b2882229adbfd0bfc84d91b0e4945..732bae3bac983e5d44d8f20301249e8a9b20814d 100755
--- a/zh-cn/application-dev/quick-start/Readme-CN.md
+++ b/zh-cn/application-dev/quick-start/Readme-CN.md
@@ -73,7 +73,7 @@
- [\@Watch:状态变量更改通知](arkts-watch.md)
- [$$语法:内置组件双向同步](arkts-two-way-sync.md)
- 渲染控制
- - [渲染控制概述](arkts-rendering-control-overview.md)
- - [if/else:条件渲染](arkts-rendering-control-ifelse.md)
- - [ForEach:循环渲染](arkts-rendering-control-foreach.md)
- - [LazyForEach:数据懒加载](arkts-rendering-control-lazyforeach.md)
+ - [渲染控制概述](arkts-rendering-control-overview.md)
+ - [if/else:条件渲染](arkts-rendering-control-ifelse.md)
+ - [ForEach:循环渲染](arkts-rendering-control-foreach.md)
+ - [LazyForEach:数据懒加载](arkts-rendering-control-lazyforeach.md)
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
index 02e5bdb3b7f7e261cb411f9dec3ad2a9c24e8226..bfef572d4b77eac194e98354f88b5c3d8595fc95 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
@@ -97,12 +97,12 @@ Ability组件信息标志,指示需要获取的Ability组件信息的内容。
| 名称 | 值 | 说明 |
|:----------------:|:---:|-----|
-| FORM | 0 | [FormExtensionAbility](../../application-models/widget-development-stage.md):卡片扩展能力,提供卡片开发能力。 |
+| FORM | 0 | [FormExtensionAbility](../../application-models/service-widget-overview.md):卡片扩展能力,提供卡片开发能力。 |
| WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler-dev-guide.md):延时任务扩展能力,允许应用在系统闲时执行实时性不高的任务。 |
| INPUT_METHOD | 2 | [InputMethodExtensionAbility](js-apis-inputmethod-extension-ability.md):输入法扩展能力,用于开发输入法应用。 |
| SERVICE | 3 | [ServiceExtensionAbility](../../application-models/serviceextensionability.md):后台服务扩展能力,提供后台运行并对外提供相应能力。 |
| ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md):无障碍服务扩展能力,支持访问与操作前台界面。 |
-| DATA_SHARE | 5 | [DataShareExtensionAbility](../../database/database-datashare-guidelines.md):数据共享扩展能力,用于对外提供数据读写服务。 |
+| DATA_SHARE | 5 | [DataShareExtensionAbility](../../database/share-data-by-datashareextensionability.md):数据共享扩展能力,用于对外提供数据读写服务。 |
| FILE_SHARE | 6 | FileShareExtensionAbility:文件共享扩展能力,用于应用间的文件分享。预留能力,当前暂未支持。 |
| STATIC_SUBSCRIBER| 7 | [StaticSubscriberExtensionAbility](js-apis-application-staticSubscriberExtensionAbility.md):静态广播扩展能力,用于处理静态事件,比如开机事件。 |
| WALLPAPER | 8 | WallpaperExtensionAbility:壁纸扩展能力,用于实现桌面壁纸。预留能力,当前暂未支持。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-effectKit.md b/zh-cn/application-dev/reference/apis/js-apis-effectKit.md
index 19e128c424c2554cf11544241c51389277e0bcdc..377f3e7ef73d3941138ff7b6693aed3a7267e5b6 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-effectKit.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-effectKit.md
@@ -29,7 +29,7 @@ createEffect(source: image.PixelMap): Filter
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ----------------- | ---- | -------- |
-| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | image模块创建的PixelMap实例。 |
+| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | image模块创建的PixelMap实例。可通过图片解码或直接创建获得,具体可见[图片开发指导](../../media/image-overview.md)。 |
**返回值:**
@@ -61,7 +61,7 @@ createColorPicker(source: image.PixelMap): Promise\
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------- | ---- | -------------------------- |
-| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | image模块创建的PixelMap实例。 |
+| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | image模块创建的PixelMap实例。可通过图片解码或直接创建获得,具体可见[图片开发指导](../../media/image-overview.md)。 |
**返回值:**
@@ -95,7 +95,7 @@ createColorPicker(source: image.PixelMap, callback: AsyncCallback\)
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------ | ---- | -------------------------- |
-| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 |image模块创建的PixelMap实例。 |
+| source | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 |image模块创建的PixelMap实例。可通过图片解码或直接创建获得,具体可见[图片开发指导](../../media/image-overview.md)。 |
| callback | AsyncCallback\<[ColorPicker](#colorpicker)> | 是 | 回调函数。返回创建的ColorPicker实例。 |
**示例:**
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-state-management.md b/zh-cn/application-dev/reference/arkui-ts/ts-state-management.md
index 9e777fcbe54b3fb0f98a1952f8d2202939effa03..59f96f604254073822dc4bdc98be4694f1b40418 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-state-management.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-state-management.md
@@ -352,7 +352,7 @@ let res: boolean = AppStorage.IsMutable('simpleProp');
static Size(): number
-返回LocalStorage中的属性数量。
+返回AppStorage中的属性数量。
**返回值:**
@@ -487,7 +487,7 @@ let res1: boolean = storage.set('PropB', 47); // false
### setOrCreate9+
-setOrCreate<T>(propName: string, newValue?: T): boolean
+setOrCreate<T>(propName: string, newValue: T): boolean
propName如果已经在LocalStorage中存在,则设置propName对应是属性的值为newValue。如果不存在,则创建propName属性,初始化为newValue。
@@ -496,7 +496,7 @@ propName如果已经在LocalStorage中存在,则设置propName对应是属性
| 参数名 | 类型 | 必填 | 参数描述 |
| -------- | ------ | ---- | ----------------------- |
| propName | string | 是 | LocalStorage中的属性名。 |
-| newValue | T | 否 | 属性值,不能为undefined或者null。 |
+| newValue | T | 是 | 属性值,不能为undefined或者null。 |
**返回值:**
@@ -573,7 +573,7 @@ var link2: SubscribedAbstractProperty = storage.setAndLink('PropA', 50);
### prop9+
-prop<T>(propName: string): SubscribedAbstractProperty<T>
+prop<S>(propName: string): SubscribedAbstractProperty<S>
如果给定的propName在LocalStorage存在,则返回与LocalStorage中propName对应属性的单向绑定数据。如果LocalStorage中不存在propName,则返回undefined。单向绑定数据的修改不会被同步回LocalStorage中。
@@ -587,7 +587,7 @@ prop<T>(propName: string): SubscribedAbstractProperty<T>
| 类型 | 描述 |
| ----------------------------------- | ---------------------------------------- |
-| SubscribedAbstractProperty<T> | SubscribedAbstractProperty<T>的实例,如果AppStorage不存在对应的propName,在返回undefined。 |
+| SubscribedAbstractProperty<S> | SubscribedAbstractProperty<S>的实例,如果AppStorage不存在对应的propName,在返回undefined。 |
```ts
@@ -600,7 +600,7 @@ prop1.set(1); // one-way sync: prop1.get()=1; but prop2.get() == 47
### setAndProp9+
-setAndProp<T>(propName: string, defaultValue: T): SubscribedAbstractProperty<T>
+setAndProp<S>(propName: string, defaultValue: S): SubscribedAbstractProperty<S>
propName在LocalStorage存在,则返回该propName对应的属性的单向绑定数据。如果不存在,则使用defaultValue在LocalStorage创建和初始化propName对应的属性,返回其单向绑定数据。
@@ -609,13 +609,13 @@ propName在LocalStorage存在,则返回该propName对应的属性的单向绑
| 参数名 | 类型 | 必填 | 参数描述 |
| ------------ | ------ | ---- | ---------------------------------------- |
| propName | string | 是 | LocalStorage中的属性名。 |
-| defaultValue | T | 是 | 当propName在AppStorage中不存在,使用default在AppStorage中初始化对应的propName。 |
+| defaultValue | S | 是 | 当propName在AppStorage中不存在,使用default在AppStorage中初始化对应的propName。 |
**返回值:**
| 类型 | 描述 |
| ----------------------------------- | ---------------------------------------- |
-| SubscribedAbstractProperty<T> | SubscribedAbstractProperty<T>的实例,和AppStorage中propName对应属性的单向绑定的数据。 |
+| SubscribedAbstractProperty<S> | SubscribedAbstractProperty<S>的实例,和AppStorage中propName对应属性的单向绑定的数据。 |
```ts
diff --git a/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-file.md b/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-file.md
index 76f57c4f3118b417549835e71ec8232ad2efff84..cfe46dcd3b83e79e90b8b4b29479214e3b179932 100644
--- a/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-file.md
+++ b/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-file.md
@@ -60,4 +60,4 @@ JS服务卡片(entry/src/main/js/Widget)的典型开发目录结构如下:
FA卡片需要在应用配置文件config.json中进行配置。详细的配置内容请参考[FA卡片配置文件说明](../../application-models/widget-development-fa.md#配置卡片配置文件)。
-Stage卡片需要在应用配置文件module.json5中的extensionAbilities标签下,配置ExtensionAbility相关信息。详细的配置内容请参考[Stage卡片配置文件说明](../../application-models/arkts-ui-widget-configuration.md)。
\ No newline at end of file
+Stage卡片需要在应用配置文件module.json5中的extensionAbilities标签下,配置ExtensionAbility相关信息。详细的配置内容请参考[Stage卡片配置文件说明](../../application-models/arkts-ui-widget-configuration.md)。
diff --git a/zh-cn/application-dev/ui/Readme-CN.md b/zh-cn/application-dev/ui/Readme-CN.md
index f560714e200dc0ea6c53ff741cce8966d2a6f13e..858f35b12b45c3fdbce4e9c35901e149bbc3202c 100755
--- a/zh-cn/application-dev/ui/Readme-CN.md
+++ b/zh-cn/application-dev/ui/Readme-CN.md
@@ -6,15 +6,15 @@
- 开发布局
- [布局概述](arkts-layout-development-overview.md)
- 构建布局
- - [线性布局](arkts-layout-development-linear.md)
- - [层叠布局](arkts-layout-development-stack-layout.md)
- - [弹性布局](arkts-layout-development-flex-layout.md)
- - [相对布局](arkts-layout-development-relative-layout.md)
- - [栅格布局](arkts-layout-development-grid-layout.md)
- - [媒体查询](arkts-layout-development-media-query.md)
- - [创建列表](arkts-layout-development-create-list.md)
- - [创建网格](arkts-layout-development-create-grid.md)
- - [创建轮播](arkts-layout-development-create-looping.md)
+ - [线性布局](arkts-layout-development-linear.md)
+ - [层叠布局](arkts-layout-development-stack-layout.md)
+ - [弹性布局](arkts-layout-development-flex-layout.md)
+ - [相对布局](arkts-layout-development-relative-layout.md)
+ - [栅格布局](arkts-layout-development-grid-layout.md)
+ - [媒体查询](arkts-layout-development-media-query.md)
+ - [创建列表](arkts-layout-development-create-list.md)
+ - [创建网格](arkts-layout-development-create-grid.md)
+ - [创建轮播](arkts-layout-development-create-looping.md)
- [改善布局性能](arkts-layout-development-performance-boost.md)
- 添加组件
- 添加常用组件
diff --git a/zh-cn/application-dev/web/Readme-CN.md b/zh-cn/application-dev/web/Readme-CN.md
index 7d74417e17ffc7e3468459dbbfc18f257855f0d9..cda5e7768fb95460aace66271408b7677fe6d67d 100644
--- a/zh-cn/application-dev/web/Readme-CN.md
+++ b/zh-cn/application-dev/web/Readme-CN.md
@@ -3,14 +3,14 @@
- [Web组件概述](web-component-overview.md)
- [使用Web组件加载页面](web-page-loading-with-web-components.md)
- 设置基本属性和事件
- - [设置深色模式](web-set-dark-mode.md)
- - [上传文件](web-file-upload.md)
- - [在新窗口中打开页面](web-open-in-new-window.md)
- - [管理位置权限](web-geolocation-permission.md)
+ - [设置深色模式](web-set-dark-mode.md)
+ - [上传文件](web-file-upload.md)
+ - [在新窗口中打开页面](web-open-in-new-window.md)
+ - [管理位置权限](web-geolocation-permission.md)
- 在应用中使用前端页面JavaScript
- - [应用侧调用前端页面函数](web-in-app-frontend-page-function-invoking.md)
- - [前端页面调用应用侧函数](web-in-page-app-function-invoking.md)
- - [建立应用侧与前端页面数据通道](web-app-page-data-channel.md)
+ - [应用侧调用前端页面函数](web-in-app-frontend-page-function-invoking.md)
+ - [前端页面调用应用侧函数](web-in-page-app-function-invoking.md)
+ - [建立应用侧与前端页面数据通道](web-app-page-data-channel.md)
- [管理页面跳转及浏览记录导航](web-redirection-and-browsing-history-mgmt.md)
- [管理Cookie及数据存储](web-cookie-and-data-storage-mgmt.md)
- [自定义页面请求响应](web-resource-interception-request-mgmt.md)
diff --git a/zh-cn/device-dev/subsystems/Readme-CN.md b/zh-cn/device-dev/subsystems/Readme-CN.md
index 0d791ec1960c411b8ecf08997969a0f105d4b921..760e4b168106147a7c00b482ae91e33a1cced75e 100644
--- a/zh-cn/device-dev/subsystems/Readme-CN.md
+++ b/zh-cn/device-dev/subsystems/Readme-CN.md
@@ -110,3 +110,5 @@
- [充电限流限压定制开发指导](subsys-power-charge-current-voltage-limit.md)
- [充电类型定制开发指导](subsys-power-charge-type-customization.md)
- [关机充电动画开发指导](subsys-power-poweroff-charge-animation.md)
+ - 耗电统计
+ - [耗电统计定制开发指导](subsys-power-stats-power-average-customization.md)
diff --git a/zh-cn/device-dev/subsystems/subsys-power-stats-power-average-customization.md b/zh-cn/device-dev/subsystems/subsys-power-stats-power-average-customization.md
new file mode 100644
index 0000000000000000000000000000000000000000..adab21840e613eb520dc9f1447b07bab3bea30a5
--- /dev/null
+++ b/zh-cn/device-dev/subsystems/subsys-power-stats-power-average-customization.md
@@ -0,0 +1,202 @@
+# 耗电统计定制开发指导
+
+## 概述
+
+### 简介
+
+OpenHarmony默认提供了耗电统计的特性。由于不同产品的硬件规格是不同的,各个硬件的耗电基准也不同。产品希望根据产品的设计规格来定制耗电基准。OpenHarmony提供了耗电基准的定制方式,产品定制开发者可根据产品的设计规格来定制。
+
+### 基本概念
+
+耗电统计:在用户使用设备的过程中,各种软硬件服务会通过[HiSysEvent](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-dfx-hisysevent-overview.md)上报软硬件的使用事件,根据这些事件可以计算软硬件的使用时长,然后基于硬件的耗电基准,统计所得软硬件的耗电量。
+
+耗电基准:产品硬件在各种状态下的基准耗电量(单位:毫安时),如相机打开时的基准耗电量,CPU在各种频率下的基准耗电量等。
+
+### 约束与限制
+
+按照[配置策略组件介绍](https://gitee.com/openharmony/customization_config_policy)的说明,设定产品定制的配置路径,需要根据配置策略决定。本开发指南中的定制路径以`/vendor`进行举例,请开发者根据具体的产品配置策略,修改定制路径。
+
+## 开发指导
+
+### 搭建环境
+
+设备要求:
+
+标准系统开发板,如DAYU200/Hi3516DV300开源套件。
+
+环境要求:
+
+Linux调测环境,相关要求和配置可参考《[快速入门](../quick-start/quickstart-overview.md)》。
+
+### 开发步骤
+
+本文以[DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568)为例介绍耗电统计的定制方法。
+
+1. 在产品目录[(vendor/hihope/rk3568)](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568)下创建battery_statistics文件夹。
+
+
+2. 参考[默认耗电统计配置文件夹](https://gitee.com/openharmony/powermgr_battery_statistics/tree/master/services/profile)创建目标文件夹,并安装到`vendor/hihope/rk3568/battery_statistics`目录,文件格式如下:
+
+ ```shell
+ profile
+ ├── BUILD.gn # BUILD.gn文件
+ └── power_average.json # 耗电统计配置文件,包含硬件的耗电基准
+ ```
+
+3. 参考[默认耗电统计配置文件夹中的power_average.json](https://gitee.com/openharmony/powermgr_battery_statistics/blob/master/services/profile/power_average.json)编写定制的power_average.json,包含定制后的耗电基准。详细说明如下:
+
+ **表1** 耗电基准配置项说明
+ | 配置项 | 硬件类型 | 数据类型 | 描述 |
+ |----------|------|---------|-------------------------------------------------------------------------|
+ | alarm_on | - | Double | 定时器Timer触发一次耗电量,即基准耗电量,用于计算系统或者应用对Timer使用的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 触发次数 * 耗电基准 |
+ | bluetooth_br_on | Bluetooth | Double | 蓝牙开启时的基准耗电量,用于计算蓝牙开启过程中的功耗。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | bluetooth_br_scan | Bluetooth | Double | 蓝牙扫描状态的基准耗电量,用于计算蓝牙扫描过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | bluetooth_ble_on | Bluetooth | Double | 低功耗蓝牙开启时的基准耗电量,用于计算蓝牙开启过程中的功耗。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | bluetooth_ble_scan | Bluetooth | Double | 低功耗蓝牙扫描状态的基准耗电量,用于计算蓝牙扫描过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | wifi_on | WIFI | Double | WIFI开启时的基准耗电量,用于计算WIFI开启过程中的功耗。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | wifi_scan | WIFI | Double | WIFI扫描一次耗电量,用于计算WIFI扫描时的功耗。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 触发次数 * 耗电基准 |
+ | radio_on | Phone | Double数组 | 通话开启时的基准耗电量,数组形式,用于配置不同等级信号强度的基准耗电量。默认配置包括4个信号等级的基准耗电信息。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | radio_data | Phone | Double数组 | 网络开启时的基准耗电量,数组形式,用于配置不同等级信号强度的基准耗电量。默认配置包括4个信号等级的基准耗电信息。 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | camera_on | Camera | Double | 相机开启时的基准耗电量,用于计算相机开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | flashlight_on | Flashlight | Double | 闪光灯开启时的基准耗电量,用于计算闪光灯开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | gnss_on | GNSS | Double | GNSS(Global Navigation Satellite System)开启时的基准耗电量,用于计算GNSS开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | sensor_gravity_on | Gravity Sensor | Double | 重力传感器开启时的基准耗电量,用于计算重力传感器开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | sensor_proximity_on | Proximity Sensor | Double | 接近传感器开启时的基准耗电量,用于计算接近传感器开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | audio_on | Audio | Double | 音响开启时的基准耗电量,用于计算音响开启过程中的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | screen_on screen_brightness | Screen | Double | screen_on:屏幕的基础状态下的基准耗电量(不包括屏幕亮度产生的耗电量); screen_brightness:屏幕亮度每提升一个等级,需要额外增加的基准耗电量; 例如:假定条件,screen_on = 90,screen_brightness = 2,屏幕亮度为100,屏幕亮度100时的基准耗电量:90 + 2 * 100 = 290 - 功耗类型:硬件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | cpu_awake | CPU | Double | CPU唤醒锁持锁状态时的基准耗电量,用于计算CPU唤醒锁持锁状态时的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | cpu_idle | CPU | Double | CPU空闲状态时的基准耗电量,用于计算CPU空闲状态的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | cpu_suspend | CPU | Double | CPU休眠状态时的基准耗电量,用于计算CPU休眠状态的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | cpu_active | CPU | Double | CPU活动状态时的基准耗电量,用于计算CPU活动状态的功耗。 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+ | cpu_clusters cpu_speed_clusterX | CPU | Double数组 | cpu_clusters:cpu cluster的基准耗电量,数组形式,用于配置不同cpu cluster基准耗电量。默认配置包括3个不同cpu cluster基准耗电信息。 cpu_speed_clusterX:cpu cluster不同频率的基准耗电量,数组形式。X代表序号,默认配置中X的范围0~2,对应cpu_clusters数组大小。例如:默认配置cpu_clusters的数组大小为3,顺序对应配置项cpu_speed_cluster0、cpu_speed_cluster1、cpu_speed_cluster2。 - 扩展性:可扩展 - 功耗类型:软件功耗 - 统计方法:耗电量 = 持续时间 * 耗电基准 |
+
+ >说明:表格中描述的硬件类型为真实硬件名称,不代表耗电统计类型,具体的耗电统计类型,请参考[ConsumptionType](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-batteryStatistics.md#consumptiontype)定义。
+
+4. 参考[默认耗电统计配置文件夹中的BUILD.gn](https://gitee.com/openharmony/powermgr_battery_statistics/blob/master/services/profile/BUILD.gn)编写BUILD.gn文件,将power_average.json打包安装到`/vendor/etc/profile`目录下,例如:
+
+ ```shell
+ import("//build/ohos.gni") # 引用build/ohos.gni
+
+ # Install power_average.json to /vendor/etc/profile/power_average.json
+ ohos_prebuilt_etc("power_average_config") { # 自定义名称,例子中用名:power_average_config
+ source = "power_average.json"
+ relative_install_dir = "profile"
+ install_images = [ chipset_base_dir ] # 安装到vendor目录下的必要配置,chipset_base_dir = “vendor”, 如果不配置,默认安装到system目录
+ part_name = "product_rk3568" # part_name为product_rk3568,以实现后续编译
+ }
+ ```
+
+5. 将编译目标添加到`/vendor/hihope/rk3568`目录下[ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build)的“module_list”中,例如:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/battery_statistics/profile:power_average_config", # 添加power_average_config的编译
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf"
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+
+ “//vendor/hihope/rk3568/power/battery_statistics/”为文件夹路径,“profile”为创建的文件夹名字,“power_average_config”为编译目标。
+
+6. 参考《[快速入门](../quick-start/quickstart-overview.md)》编译定制版本,编译命令如下:
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. 将定制版本烧录到DAYU200开发板中。
+
+### 调测验证
+
+1. 开机后,先进入shell命令行。
+
+ ```shell
+ hdc shell
+ ```
+
+2. 执行下列命令,观察vendor目录下power_average.json是否创建成功。
+
+ ```shell
+ ls -l /vendor/etc/profile/
+ ```
+
+ 创建成功,在/vendor/etc/profile/存在配置文件power_average.json。
+
+ ```shell
+ # ls -l /vendor/etc/profile/
+ total 4
+ -rw-r--r-- 1 root root 1446 2023-03-26 16:47 power_average.json
+ #
+ ```
+
+3. 如果创建成功,执行下列命令,观察vendor目录下power_average.json中的信息是否与定制信息一致。
+
+ ```shell
+ cat /vendor/etc/profile/power_average.json
+ ```
+
+4. 如果信息一致,执行执行下列命令,观察console输出。
+
+ ```shell
+ hidumper -s 3304 -a -poweraverage
+ ```
+
+5. console输出的是定制后的耗电基准信息,如:
+
+ 定制耗电统计之前,使用默认耗电基准为:
+
+ ```shell
+ # hidumper -s 3304 -a -poweraverage
+
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------BatteryStatisticsService---------------------------------
+ POWER AVERAGE CONFIGATION DUMP:
+
+ ······(省略其他,只显示camera的配置)
+
+ camera_on : 810.000000
+
+ ······
+ ```
+
+ 本节以“camera_on”:3000为例(默认值为810),更改之后:
+
+ ```shell
+ # hidumper -s 3304 -a -poweraverage
+
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------BatteryStatisticsService---------------------------------
+ POWER AVERAGE CONFIGATION DUMP:
+
+ ······(省略其他,只显示camera的配置)
+
+ camera_on : 3000.000000 # 修改后,“camera_on”:3000
+
+ ······
+ ```
+
+6. 耗电统计配置文件定制成功后,耗电统计会根据定制的耗电基准进行计算。
+
+7. 通过batterystatistics模块提供的[JS API](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.batteryStatistics.d.ts)或[Inner API](https://gitee.com/openharmony/powermgr_battery_statistics/blob/master/interfaces/innerkits/include/battery_stats_client.h)可以获得详细的耗电信息,验证定制的耗电基准。
+
+## 参考
+
+开发过程中可参考的配置文件路径:[系统默认耗电统计配置源码路径](https://gitee.com/openharmony/powermgr_battery_statistics/tree/master/services/profile)
+
+默认打包路径:/system/etc/profile
+
+定制路径:/vendor/etc/profile
diff --git a/zh-cn/device-dev/website.md b/zh-cn/device-dev/website.md
index acf6bc882e0f63f45e16b7ecf0c2499d9cf0ca18..786b3ed5b3f58aa02056f8d26e63d32ddf1a596d 100644
--- a/zh-cn/device-dev/website.md
+++ b/zh-cn/device-dev/website.md
@@ -475,6 +475,9 @@
- [HiChecker开发指导](subsystems/subsys-dfx-hichecker.md)
- [Faultlogger开发指导](subsystems/subsys-dfx-faultlogger.md)
- [Hiview开发指导](subsystems/subsys-dfx-hiview.md)
+ - 电源
+ - 耗电统计
+ - [耗电统计定制开发指导](subsystems/subsys-power-stats-power-average-customization.md)
- 专题
- HPM Part
diff --git a/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md b/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md
index 448a7025881dcdd6deecdf146058ddc056b0c97a..18f965c713a45ffd4c6cb3b4adae4409e2947995 100644
--- a/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md
+++ b/zh-cn/release-notes/OpenHarmony-v3.2-beta5.md
@@ -45,9 +45,9 @@ ArkUI适配了根据资源名称获取资源的能力。
| 软件 | 版本 | 备注 |
| -------- | -------- | -------- |
| OpenHarmony | 3.2 Beta5 | NA |
-| Public SDK | Ohos_sdk_public 3.2.10.6 (API Version 9 Beta5) | 面向应用开发者提供,不包含需要使用系统权限的系统接口。通过DevEco Studio默认获取的SDK为Public SDK。 |
-| HUAWEI DevEco Studio(可选) | *待发布* | OpenHarmony应用开发推荐使用。 |
-| HUAWEI DevEco Device Tool(可选) | *待发布* | OpenHarmony智能设备集成开发环境推荐使用。 |
+| Public SDK | Ohos_sdk_public 3.2.10.6 (API Version 9 Beta5) | 面向应用开发者提供,不包含需要使用系统权限的系统接口。 通过DevEco Studio默认获取的SDK为Public SDK。 |
+| HUAWEI DevEco Studio(可选) | 3.1 Beta1 | OpenHarmony应用开发推荐使用。 [请点击此处获取](https://developer.harmonyos.com/cn/develop/deveco-studio#download) |
+| HUAWEI DevEco Device Tool(可选) | 3.1 Beta2 | OpenHarmony智能设备集成开发环境推荐使用。 [请点击此处获取](https://device.harmonyos.com/cn/develop/ide#download) |
## 源码获取
@@ -137,9 +137,9 @@ ArkUI适配了根据资源名称获取资源的能力。
### SDK变更
-从本版本起,SDK仅发布提供Public SDK,也可通过DevEcoStudio下载使用。
+从本版本起,仅发布Public SDK,开发者可从镜像站点获取或通过DevEco Studio下载Public SDK用于应用开发。
-Full SDK需下载源码编译构建并替换使用,源码编译指导见[full-SDK编译指南](../application-dev/quick-start/full-sdk-compile-guide.md)
+包含系统接口的全量SDK(Full SDK)需下载全量代码后编译构建出SDK文件,并在DevEco Studio中替换。通过源码编译Full SDK的指导请参见[Full-SDK编译指南](../application-dev/quick-start/full-sdk-compile-guide.md)。
### 特性变更
@@ -162,6 +162,11 @@ Full SDK需下载源码编译构建并替换使用,源码编译指导见[full-
| 文件存储 | - 新增应用文件统一URI处理能力。 - 新增支持公共数据的临时授权和统一的打开入口。 主要涉及以下需求: I687C8【新增能力】支持应用文件统一URI处理能力 I64U8W【基础能力】支持公共数据的临时授权和统一open入口 | NA |
| 元能力 | - 新增常驻进程重启优化。 - 支持卡片数据库切换。 - 支持异步onConnected等能力。 主要涉及以下需求: I65M3F 【基础能力】执行ShellCommand命令管控 I65V83 【基础能力】ServiceExtensionAbility支持异步onConnected生命周期 I61H21 【基础能力】卡片本地数据库切换 I63UJ5 【元能力】【ability_runtime】API8及以前API 支持异常处理 I6BDCW 【基础能力】应用加载禁止加载data目录下的代码 I6BDDU 【基础能力】FA模型默认启动方式为Standard I6BDE2 【基础能力】常驻应用异常频繁重启保护 | NA |
+API变更清单请参考:[API差异报告](api-change/v3.2-beta5/Readme.md)
+
+各子系统API详细变更说明请参考:[变更说明](changelogs/v3.2-beta5/Readme.md)
+
+
### 芯片及开发板适配
@@ -174,16 +179,13 @@ Full SDK需下载源码编译构建并替换使用,源码编译指导见[full-
| 子系统 | 名称 | 简介 | 开发语言 |
| -------- | -------- | -------- | -------- |
-| web | [JS注入与执行](https://gitee.com/openharmony/applications_app_samples/tree/master/Web/RunJsInWeb) | 本示例基于H5游戏,通过ArkUI的button实现对游戏实现基本控制,展示webview的JS注入与执行能力,及native应用与H5的通信能力。 | ArkTs |
-| 媒体子系统 | [二维码扫描](https://gitee.com/openharmony/applications_app_samples/tree/master/media/QRCodeScan) | 本示例展示二维码扫描,从文件中选择二维码图片进行解析和读取,识别二维码信息。 | ArkTs |
-| ArkUI | [一多设置典型页面](https://gitee.com/openharmony/applications_app_samples/tree/master/MultiDeviceAppDev/Settings) | 本示例展示了设置应用的典型页面,其在小窗口和大窗口有不同的显示效果,体现一次开发、多端部署的能力。 | ArkTs |
-| 文件管理 | [文件管理](https://gitee.com/openharmony/applications_app_samples/tree/master/FileManager/FileManager) | 本示例主要展示了文件管理相关的功能,使用[mediaLibrary](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md)、[userFileManager](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-userfilemanager.md)、[fileio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-fileio.md)等接口,实现了媒体库文件、应用沙箱内文件的添加和访问等功能。 | ArkTs |
-| 媒体子系统 | [录屏](https://gitee.com/openharmony/applications_app_samples/tree/master/media/ScreenRecorder) | 该示例展示设备屏幕(含音频)录制功能。屏幕录制的主要工作是通过创建一个虚拟屏,捕获屏幕显示图形帧,完成视频编码并保存到文件中,帮助OEM设备厂家系统应用实现屏幕录制功能,也可以通过此应用抓取屏幕帧用于问题复现录制。 | ArkTs |
-| 窗口子系统 | [屏幕探测](https://gitee.com/openharmony/applications_app_samples/tree/master/device/ScreenDetector) | 本示例实时监测连接的屏幕数量状态,支持创建至多5个虚拟屏幕,点击对应的屏幕矩形能显示该屏幕的相关属性。 | ArkTs |
-| 元能力 | [Stage模型卡片小游戏](https://gitee.com/openharmony/applications_app_samples/tree/master/ability/FormGame) | 本示例展示了如何通过Stage模型实现一个简单的游戏卡片。 | ArkTs |
+| 媒体子系统 | [二维码扫描](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-3.2-Beta5/media/Scan) | 本示例展示二维码扫描,从文件中选择二维码图片进行解析和读取,识别二维码信息。 | ArkTs |
+| ArkUI | [一多应用市场首页](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-3.2-Beta5/MultiDeviceAppDev/AppMarket) | 本示例展示了应用市场首页,其在小窗口和大窗口有不同的显示效果,体现一次开发、多端部署的能力。 | ArkTs |
+| 文件管理 | [文件管理](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-3.2-Beta5/FileManager/FileIo) | 本示例主要展示了文件管理相关的功能,使用[mediaLibrary](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md)、[userFileManager](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-userfilemanager.md)、[fileio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-fileio.md)等接口,实现了媒体库文件、应用沙箱内文件的添加和访问等功能。 | ArkTs |
+| 元能力 | [图库卡片](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-3.2-Beta5/ability/GalleryForm) | 本示例是模拟图库卡片,实现对图库中的照片在卡片中显示,定时刷新卡片内容等功能。 | ArkTs |
-请访问[Samples](https://gitee.com/openharmony/app_samples)仓了解更多信息。
+请访问[Samples](https://gitee.com/openharmony/applications_app_samples)仓了解更多信息。
## 修复缺陷列表
diff --git a/zh-cn/release-notes/api-diff/Beta5 to v3.2-Release/Readme-CN.md b/zh-cn/release-notes/api-diff/Beta5 to v3.2-Release/Readme-CN.md
new file mode 100644
index 0000000000000000000000000000000000000000..655f26f623bcf6418a99b254cdbe66c7886b0308
--- /dev/null
+++ b/zh-cn/release-notes/api-diff/Beta5 to v3.2-Release/Readme-CN.md
@@ -0,0 +1,27 @@
+# JS API差异报告
+
+- [元能力](js-apidiff-ability.md)
+- [帐号](js-apidiff-account.md)
+- [应用](js-apidiff-application.md)
+- [ArkUI](js-apidiff-arkui.md)
+- [电源服务](js-apidiff-battery.md)
+- [包管理](js-apidiff-bundle.md)
+- [网络及通信](js-apidiff-communication.md)
+- [语言编译器运行时](js-apidiff-compiler-and-runtime.md)
+- [DFX](js-apidiff-dfx.md)
+- [分布式数据](js-apidiff-distributed-data.md)
+- [文件管理](js-apidiff-file-management.md)
+- [Misc软件](js-apidiff-misc.md)
+- [媒体服务](js-apidiff-multimedia.md)
+- [事件与通知](js-apidiff-notification.md)
+- [资源调度](js-apidiff-resource-scheduler.md)
+- [安全](js-apidiff-security.md)
+- [泛Sensor](js-apidiff-sensor.md)
+- [启动](js-apidiff-start-up.md)
+- [电话服务](js-apidiff-telephony.md)
+- [测试服务](js-apidiff-unitest.md)
+- [升级](js-apidiff-update.md)
+- [USB服务](js-apidiff-usb.md)
+- [用户IAM](js-apidiff-user-iam.md)
+- [Web](js-apidiff-web.md)
+- [窗口](js-apidiff-window.md)
diff --git a/zh-cn/release-notes/api-diff/v3.2-Release/Readme-CN.md b/zh-cn/release-notes/api-diff/v3.2-Release/Readme-CN.md
new file mode 100644
index 0000000000000000000000000000000000000000..604908992c5a3550f7169927359539d3d89705b4
--- /dev/null
+++ b/zh-cn/release-notes/api-diff/v3.2-Release/Readme-CN.md
@@ -0,0 +1,35 @@
+# JS API差异报告
+
+- [元能力](js-apidiff-ability.md)
+- [无障碍](js-apidiff-accessibility.md)
+- [帐号](js-apidiff-account.md)
+- [应用](js-apidiff-application.md)
+- [ArkUI](js-apidiff-arkui.md)
+- [电源服务](js-apidiff-battery.md)
+- [包管理](js-apidiff-bundle.md)
+- [网络及通信](js-apidiff-communication.md)
+- [语言编译器运行时](js-apidiff-compiler-and-runtime.md)
+- [定制](js-apidiff-customization.md)
+- [DFX](js-apidiff-dfx.md)
+- [分布式数据](js-apidiff-distributed-data.md)
+- [分布式硬件](js-apidiff-distributed-hardware.md)
+- [文件管理](js-apidiff-file-management.md)
+- [位置服务](js-apidiff-geolocation.md)
+- [全球化](js-apidiff-global.md)
+- [图形图像](js-apidiff-graphic.md)
+- [Misc软件](js-apidiff-misc.md)
+- [MSDP](js-apidiff-msdp.md)
+- [多模输入](js-apidiff-multi-modal-input.md)
+- [媒体服务](js-apidiff-multimedia.md)
+- [事件与通知](js-apidiff-notification.md)
+- [资源调度](js-apidiff-resource-scheduler.md)
+- [安全](js-apidiff-security.md)
+- [泛Sensor](js-apidiff-sensor.md)
+- [启动](js-apidiff-start-up.md)
+- [电话服务](js-apidiff-telephony.md)
+- [测试服务](js-apidiff-unitest.md)
+- [升级](js-apidiff-update.md)
+- [USB服务](js-apidiff-usb.md)
+- [用户IAM](js-apidiff-user-iam.md)
+- [Web](js-apidiff-web.md)
+- [窗口](js-apidiff-window.md)
diff --git a/zh-cn/release-notes/api-diff/v3.2-beta4/Readme-CN.md b/zh-cn/release-notes/api-diff/v3.2-beta4/Readme-CN.md
index c4b1f401195907c84263b2e9f9b7a3bfb8adfd4c..24cc56054cffad3e26d1e76843d0900b30441360 100644
--- a/zh-cn/release-notes/api-diff/v3.2-beta4/Readme-CN.md
+++ b/zh-cn/release-notes/api-diff/v3.2-beta4/Readme-CN.md
@@ -1,35 +1,34 @@
-# Readme
+# JS API差异报告
-* JS API接口变更清单
- - [元能力](js-apidiff-ability.md)
- - [无障碍](js-apidiff-accessibility.md)
- - [帐号](js-apidiff-account.md)
- - [应用](js-apidiff-application.md)
- - [ArkUI](js-apidiff-arkui.md)
- - [电源服务](js-apidiff-battery.md)
- - [包管理](js-apidiff-bundle.md)
- - [网络及通信](js-apidiff-communication.md)
- - [语言编译器运行时](js-apidiff-compiler-and-runtime.md)
- - [定制](js-apidiff-customization.md)
- - [DFX](js-apidiff-dfx.md)
- - [分布式数据](js-apidiff-distributed-data.md)
- - [分布式硬件](js-apidiff-distributed-hardware.md)
- - [文件管理](js-apidiff-file-management.md)
- - [位置服务](js-apidiff-geolocation.md)
- - [全球化](js-apidiff-global.md)
- - [Misc软件](js-apidiff-misc.md)
- - [MSDP](js-apidiff-msdp.md)
- - [多模输入](js-apidiff-multi-modal-input.md)
- - [媒体服务](js-apidiff-multimedia.md)
- - [事件与通知](js-apidiff-notification.md)
- - [资源调度](js-apidiff-resource-scheduler.md)
- - [安全](js-apidiff-security.md)
- - [泛Sensor](js-apidiff-sensor.md)
- - [启动](js-apidiff-start-up.md)
- - [电话服务](js-apidiff-telephony.md)
- - [测试服务](js-apidiff-unitest.md)
- - [升级](js-apidiff-update.md)
- - [USB服务](js-apidiff-usb.md)
- - [用户IAM](js-apidiff-user-iam.md)
- - [Web](js-apidiff-web.md)
- - [窗口](js-apidiff-window.md)
\ No newline at end of file
+- [元能力](js-apidiff-ability.md)
+- [无障碍](js-apidiff-accessibility.md)
+- [帐号](js-apidiff-account.md)
+- [应用](js-apidiff-application.md)
+- [ArkUI](js-apidiff-arkui.md)
+- [电源服务](js-apidiff-battery.md)
+- [包管理](js-apidiff-bundle.md)
+- [网络及通信](js-apidiff-communication.md)
+- [语言编译器运行时](js-apidiff-compiler-and-runtime.md)
+- [定制](js-apidiff-customization.md)
+- [DFX](js-apidiff-dfx.md)
+- [分布式数据](js-apidiff-distributed-data.md)
+- [分布式硬件](js-apidiff-distributed-hardware.md)
+- [文件管理](js-apidiff-file-management.md)
+- [位置服务](js-apidiff-geolocation.md)
+- [全球化](js-apidiff-global.md)
+- [Misc软件](js-apidiff-misc.md)
+- [MSDP](js-apidiff-msdp.md)
+- [多模输入](js-apidiff-multi-modal-input.md)
+- [媒体服务](js-apidiff-multimedia.md)
+- [事件与通知](js-apidiff-notification.md)
+- [资源调度](js-apidiff-resource-scheduler.md)
+- [安全](js-apidiff-security.md)
+- [泛Sensor](js-apidiff-sensor.md)
+- [启动](js-apidiff-start-up.md)
+- [电话服务](js-apidiff-telephony.md)
+- [测试服务](js-apidiff-unitest.md)
+- [升级](js-apidiff-update.md)
+- [USB服务](js-apidiff-usb.md)
+- [用户IAM](js-apidiff-user-iam.md)
+- [Web](js-apidiff-web.md)
+- [窗口](js-apidiff-window.md)