提交 2dfcd683 编写于 作者: H HelloCrease

Merge branch 'master' of https://gitee.com/HelloCrease/docs

......@@ -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() {
}
}
```
......@@ -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<sup>(deprecated)</sup>
(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_CHANGED<sup>10+<sup>
Indicates that the SIM card state has changed.
- Value: **usual.event.SIM_STATE_CHANGED**
- Required subscriber permissions: none
## COMMON_EVENT_SMS_RECEIVED_COMPLETED<sup>10+<sup>
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_COMPLETED<sup>10+<sup>
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_COMPLETED<sup>10+<sup>
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_COMMAND<sup>10+<sup>
(Reserved, not supported yet) Indicates the STK command.
- Value: **usual.event.STK_COMMAND**
- Required subscriber permissions: none
## COMMON_EVENT_STK_SESSION_END<sup>10+<sup>
(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_CHANGED<sup>10+<sup>
(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_IDENTIFIER<sup>10+<sup>
(Reserved, not supported yet) Indicates the STK alpha indicator.
- Value: **usual.event.STK_ALPHA_IDENTIFIER**
- Required subscriber permissions: none
## COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
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_CHANGED<sup>10+<sup>
Indicates that the cellular data state has changed.
- Value: **usual.event.CELLULAR_DATA_STATE_CHANGED**
- Required subscriber permissions: none
## COMMON_EVENT_NETWORK_STATE_CHANGED<sup>10+<sup>
Indicates that the network state has changed.
- Value: **usual.event.NETWORK_STATE_CHANGED**
- Required subscriber permissions: none
## COMMON_EVENT_SIGNAL_INFO_CHANGED<sup>10+<sup>
Indicates that the signal information is updated.
- Value: **usual.event.SIGNAL_INFO_CHANGED**
- Required subscriber permissions: none
## COMMON_EVENT_INCOMING_CALL_MISSED<sup>10+<sup>
Indicates a missed call.
- Value: **usual.event.INCOMING_CALL_MISSED**
- Required subscriber permissions: ohos.permission.GET_TELEPHONY_STATE
## COMMON_EVENT_RADIO_STATE_CHANGE<sup>10+<sup>
Indicates that the power-on and power-off status of the modem has changed.
- Value: **usual.event.RADIO_STATE_CHANGE**
## COMMON_EVENT_SCREEN_LOCKED <sup>10+<sup>
Indicates that the screen is locked.
- Value: **usual.event.SCREEN_LOCKED**
- Required subscriber permissions: none
## COMMON_EVENT_SCREEN_UNLOCKED<sup>10+<sup>
Indicates that the screen is unlocked.
- Value: **usual.event.SCREEN_UNLOCKED**
- Required subscriber permissions: none
......@@ -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.<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the value **0**.|
| end | boolean | Yes | Whether jumping occurs when the interpolation ends.<br>- **true**: Jumping occurs when the interpolation ends.<br>- **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.<br>Value range: [0, 1]<br>**NOTE**<br>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.<br>Value range: (-∞, +∞) |
| x2 | number | Yes | X coordinate of the second point on the Bezier curve.<br>Value range: [0, 1]<br>**NOTE**<br>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.<br>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.<br>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.<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Default value: **0.55**|
| dampingFraction | number | No | Damping coefficient.<br>**0**: undamped. In this case, the spring oscillates forever.<br>> 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position.<br>**1**: critically damped.<br>> 1: overdamped. In this case, the spring approaches equilibrium gradually.<br>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.<br> Default value: **0**|
| response | number | No | Duration of one complete oscillation,<br>Default value: **0.55**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.55**.|
| dampingFraction | number | No | Damping coefficient.<br>**0**: undamped. In this case, the spring oscillates forever.<br>> 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position.<br>**1**: critically damped.<br>> 1: overdamped. In this case, the spring approaches equilibrium gradually.<br>Default value: **0.825**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br><br>Default value: **0**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0**.<br>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.<br>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.<br>**NOTE**<br>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**.<br>Default value: **0.15**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.15**.|
| dampingFraction | number | No | See **dampingFraction** in **springMotion**.<br>Default value: **0.86**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.86**.|
| overlapDuration | number | No | See **overlapDuration** in **springMotion**.<br>Default value: **0.25**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.25**.<br> 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.<br>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.<br>**NOTE**<br>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.<br>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.<br>**NOTE**<br>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.<br>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.interpolatingSpringCurve<sup>10+</sup>
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.<br>Value range: [0, 1]<br>**NOTE**<br>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.|
......
......@@ -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.<br>Default value: **0**|
| y | number | No | Translation distance along the y-axis, in px.<br>Default value: **0**|
| z | number | No | Translation distance along the z-axis, in px.<br>Default value: **0**|
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ----------------------------------------------------------- |
| x | number | No | Translation distance along the x-axis, in px.<br>Default value: **0**<br>Value range: (-∞, +∞)|
| y | number | No | Translation distance along the y-axis, in px.<br>Default value: **0**<br>Value range: (-∞, +∞)|
| z | number | No | Translation distance along the z-axis, in px.<br>Default value: **0**<br>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.<br>Default value: **1** |
| y | number | No | Scaling multiple along the y-axis.<br>Default value: **1** |
| z | number | No | Scaling multiple along the z-axis.<br>Default value: **1** |
| centerX | number | No | X coordinate of the center point.<br>Default value: **0**|
| centerY | number | No | Y coordinate of the center point.<br>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.<br>Default value: **1**<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Default value: **1**<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Default value: **1**<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value.|
| centerX | number | No | X coordinate of the center point.<br>Default value: **0**<br>Value range: (-∞, +∞) |
| centerY | number | No | Y coordinate of the center point.<br>Default value: **0**<br>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.<br>Default value: **1** |
| y | number | No | Y coordinate of the rotation axis vector.<br>Default value: **1** |
| z | number | No | Z coordinate of the rotation axis vector.<br>Default value: **1** |
| angle | number | No | Rotation angle.<br>Default value: **0** |
| centerX | number | No | X coordinate of the center point.<br>Default value: **0**|
| centerY | number | No | Y coordinate of the center point.<br>Default value: **0**|
| Name | Type | Mandatory| Description |
| ------- | ------ | ---- | ------------------------------------------------------- |
| x | number | No | X coordinate of the rotation axis vector.<br>Default value: **1**<br>Value range: (-∞, +∞)|
| y | number | No | Y coordinate of the rotation axis vector.<br>Default value: **1**<br>Value range: (-∞, +∞)|
| z | number | No | Z coordinate of the rotation axis vector.<br>Default value: **1**<br>Value range: (-∞, +∞)|
| angle | number | No | Rotation angle.<br>Default value: **0** |
| centerX | number | No | X coordinate of the center point.<br>Default value: **0** |
| centerY | number | No | Y coordinate of the center point.<br>Default value: **0** |
**Return value**
......
......@@ -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**
......
......@@ -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.<br>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.<br>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.<br>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.<br>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.<br>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.<br>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:<br>screen and (min-height: 50)<br>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.<br>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.<br>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.<br>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.<br>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.<br>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 &lt;=, &gt;=, &lt;, and &gt; besides the max- and min-operators.
......
......@@ -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.<br>Default value: **1000**<br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>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.<br>The value **0** indicates that no animation is applied.<br>Default value: **1**|
| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve<sup>9+</sup> | No | Animation curve.<br>Default value: **Curve.Linear**<br>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.<br>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.<br>Default value: **1**|
| duration | number | No | Animation duration, in ms.<br>Default value: **1000**<br>Unit: ms<br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>- The maximum animation duration on an ArkTS widget is 1000 ms.<br>- A value less than 1 evaluates to the value **0**.<br>- 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.<br>The value **0** indicates that no animation is applied.<br>Default value: **1**<br>**NOTE**<br>A value less than 1 evaluates to the value **1**.|
| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve<sup>9+</sup> | No | Animation curve. The default curve is linear.<br>Default value: **Curve.Linear**<br>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.<br>Default value: **0**<br>Value range: [0, +∞)<br>**NOTE**<br>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.<br>Default value: **1**<br>Value range: [-1, +∞)<br>**NOTE**<br>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.<br>Default value: **PlayMode.Normal**<br>Since API version 9, this API is supported in ArkTS widgets.|
| onFinish | () => void | No | Callback invoked when the animation playback is complete.<br>Since API version 9, this API is supported in ArkTS widgets.|
| onFinish | () => void | No | Callback invoked when the animation playback is complete.<br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>This callback is not invoked when **iterations** is set to **-1**.|
## Example
......
......@@ -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.|
## ThemeColorMode<sup>10+</sup>
| 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.|
## AdaptiveColor<sup>10+</sup>
| 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.|
## TextHeightAdaptivePolicy<sup>10+</sup>
......
......@@ -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.<br>Default value: **true**<br>Since API version 9, this API is supported in ArkTS widgets.|
| labelStyle<sup>10+</sup> | [LabelStyle](#labelstyle10) | Label style of the button.|
## ButtonType enums
## ButtonType
Since API version 9, this API is supported in ArkTS widgets.
......
......@@ -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.<br>Default value: **1**|
| fingers | number | No| Minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10.<br>Default value: **1**<br>Value range: 1 to 10<br>**NOTE**<br>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 (&amp;) and OR (\|) operations.<br>Default value: **PanDirection.All**|
| distance | number | No| Minimum pan distance to trigger the gesture, in vp.<br>Default value: **5**<br>**NOTE**<br>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.|
......
# 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.<br>Default value: **1**<br>> **NOTE**<br>> 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.<br>Default value: **1**<br>> **NOTE**<br>> 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.<br>> 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.<br>Default value: **1**<br>**NOTE**<br>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.<br>Default value: **1**<br>**NOTE**<br>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.<br>2. Gesture recognition fails if the number of fingers used for tap exceeds the configured number.|
## Events
......
......@@ -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 |
| ----------------------- | ----------------------------------- | ------------------------------------------- |
| alignItems<sup>10+</sup> | [ItemAlign](ts-appendix-enums.md#itemalign) | Alignment mode of the **\<GridCol>** cross axis.<br>Default value: **ItemAlign.Start**<br>**NOTE**<br>The alignment mode of the **\<GridCol>** 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.<br>Since API version 10, this API is supported in ArkTS widgets.|
## Events
......
......@@ -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) {
......
......@@ -22,7 +22,7 @@ SideBarContainer( type?: SideBarContainerType )
| -------- | -------- | -------- | -------- |
| type | SideBarContainerType | No| Display type of the sidebar.<br>Default value: **SideBarContainerType.Embed**|
## SideBarContainerType enums
## SideBarContainerType
| Name| Description|
| -------- | -------- |
......
......@@ -11,7 +11,7 @@ The motion path animation is used to animate a component along a custom path.
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| motionPath | {<br>path: string,<br>from?: number,<br>to?: number,<br>rotatable?: boolean<br>}<br>**NOTE**<br>In a path, **start** and **end** can be used to replace the start point and end point. Example:<br>'Mstart.x start.y L50 50 Lend.x end.y Z'<br>For more information, see [Path Drawing](../../ui/ui-js-components-svg-path.md).| {<br>'',<br>0.0,<br>1.0,<br>false<br>} | Motion path of the component.<br>- **path**: motion path of the translation animation. The value is an SVG path string.<br>- **from**: start point of the motion path. The default value is **0.0**.<br>- **to**: end point of the motion path. The default value is **1.0**.<br>- **rotatable**: whether to rotate along the path.|
| motionPath | {<br>path:&nbsp;string,<br>from?:&nbsp;number,<br>to?:&nbsp;number,<br>rotatable?:&nbsp;boolean<br>}<br>**NOTE**<br>In a path, **start** and **end** can be used to replace the start point and end point. Example:<br>'Mstart.x&nbsp;start.y&nbsp;L50&nbsp;50&nbsp;Lend.x&nbsp;end.y&nbsp;Z'<br>For more information, see [Path Drawing](../../ui/ui-js-components-svg-path.md).| {<br>'',<br>0.0,<br>1.0,<br>false<br>} | Motion path of the component.<br>- **path**: motion path of the translation animation. The value is an SVG path string.<br>- **from**: start point of the motion path.<br>Default value: **0.0**<br>Value range: [0, 1]<br>A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.<br>- **to**: end point of the motion path.<br>Default value: **1.0**<br>Value range: [0, 1]<br>A value less than 0 evaluates to the value **0**. A value larger than 1 evaluates to the value **1**.<br>- **rotatable**: whether to rotate along the path. |
## Example
......
# 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 | {<br>type?: RouteType,<br>duration?: number,<br>curve?: [Curve](ts-appendix-enums.md#curve) \| string,<br>delay?: number<br>} | Page entrance animation.<br>- **type**: route type for the page transition effect to take effect.<br>Default value: **RouteType.None**<br>**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**.<br>- **duration**: animation duration, in milliseconds.<br>- **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".<br>Default value: **Curve.Linear**<br>- **delay**: animation delay, in milliseconds. By default, the animation is played without delay.|
| PageTransitionExit | {<br>type?: RouteType,<br>duration?: number,<br>curve?: [Curve](ts-appendix-enums.md#curve) \| string,<br>delay?: number<br>} | Page exit animation.<br>- **type**: route type for the page transition effect to take effect.<br>Default value: **RouteType.None**<br>**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**.<br>- **duration**: animation duration, in milliseconds.<br>- **curve**: animation curve. The value range of the string type is the same as that of **PageTransitionEnter**.<br>Default value: **Curve.Linear**<br>- **delay**: animation delay, in milliseconds. By default, the animation is played without delay.|
| Name | Parameter | Mandatory| Description |
| ------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| PageTransitionEnter | {<br>type?: RouteType,<br>duration?: number,<br>curve?: [Curve](ts-appendix-enums.md#curve) \| string,<br>delay?: number<br>} | No | Page entrance animation.<br>- **type**: route type for the page transition effect to take effect.<br>Default value: **RouteType.None**<br>**NOTE**<br>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**.<br>- **duration**: animation duration.<br>Unit: ms<br>- **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".<br>Default value: **Curve.Linear**<br>- **delay**: animation delay.<br>Default value: **0**<br>Unit: ms|
| PageTransitionExit | {<br>type?: RouteType,<br>duration?: number,<br>curve?: [Curve](ts-appendix-enums.md#curve) \| string,<br>delay?: number<br>} | No | Page exit animation.<br>- **type**: route type for the page transition effect to take effect.<br>Default value: **RouteType.None**<br>**NOTE**<br>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**.<br>- **duration**: animation duration, in milliseconds.<br>- **curve**: animation curve. The value range of the string type is the same as that of **PageTransitionEnter**.<br>Default value: **Curve.Linear**<br>- **delay**: animation delay.<br>Default value: **0**<br>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.<br>Default value: **SlideEffect.Right**|
| translate | {<br>x? : number \| string,<br>y? : number \| string,<br>z? : number \| string<br>} | 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.<br>- **x**: translation distance along the x-axis.<br>- **y**: translation distance along the y-axis.<br>- **z**: translation distance along the y-axis.|
| scale | {<br>x? : number,<br>y? : number,<br>z? : number,<br>centerX? : number \| string,<br>centerY? : number \| string<br>} | No | Scaling effect during page transition, which is the value of the start point of entrance and the end point of exit.<br>- **x**: scale ratio along the x-axis.<br>- **y**: scale ratio along the y-axis.<br>- **z**: scale ratio along the z-axis.<br>- **centerX** and **centerY**: scale center point.<br>- If the center point is 0, it refers to the upper left corner of the component.<br>|
| scale | {<br>x? : number,<br>y? : number,<br>z? : number,<br>centerX? : number \| string,<br>centerY? : number \| string<br>} | No | Scaling effect during page transition, which is the value of the start point of entrance and the end point of exit.<br>- **x**: scale ratio along the x-axis.<br>- **y**: scale ratio along the y-axis.<br>- **z**: scale ratio along the z-axis.<br>- **centerX** and **centerY**: scale center point.<br>- 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.<br>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) =&gt; void) | The callback input parameter is the normalized progress of the current entrance animation. The value range is 0–1.<br>- **type**: route type.<br>- **progress**: current progress.|
| onExit(event: (type?: RouteType, progress?: number) =&gt; void) | The callback input parameter is the normalized progress of the current exit animation. The value range is 0–1.<br>- **type**: route type.<br>- **progress**: current progress.|
| onEnter(event: (type?: RouteType, progress?: number) =&gt; 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.<br>- **type**: route type.<br>- **progress**: current progress. |
| onExit(event: (type?: RouteType, progress?: number) =&gt; 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.<br>- **type**: route type.<br>- **progress**: current progress. |
## Example
......
......@@ -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.<br>If no transition effect is set, an opacity transition from 0 to 1 is applied. <br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>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.<br>Default value: **TransitionType.All**<br>**NOTE**<br>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.<br>Default value: **1**|
| translate | {<br>x? : number \| string,<br>y? : number \| string,<br>z? : number \| string<br>} | No| Translation of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>-**x**: distance to translate along the x-axis.<br>-**y**: distance to translate along the y-axis.<br>-**z**: distance to translate along the z-axis.|
| scale | {<br>x? : number,<br>y? : number,<br>z? : number,<br>centerX? : number \| string,<br>centerY? : number \| string<br>} | No| Scaling of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>- **x**: scale factor along the x-axis.<br>- **y**: scale factor along the y-axis.<br>- **z**: scale factor along the z-axis.<br>- **centerX** and **centerY**: x coordinate and y coordinate of the scale center, respectively. The default values are both **"50%"**.<br>- If the center point is 0, it indicates the upper left corner of the component.<br>|
| rotate | {<br>x?: number,<br>y?: number,<br>z?: number,<br>angle?: number \| string,<br>centerX?: number \| string,<br>centerY?: number \| string<br>} | No| Rotation of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>- **x**: rotation vector along the x-axis.<br>- **y**: rotation vector along the y-axis.<br>- **z**: rotation vector along the z-axis.<br>- **centerX** and **centerY**: x coordinate and y coordinate of the rotation center, respectively. The default values are both **"50%"**.<br>- 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.<br>Default value: **TransitionType.All**<br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>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.<br>Default value: **1**<br>Value range: [0, 1]<br>Since API version 9, this API is supported in ArkTS widgets.<br>**NOTE**<br>A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.|
| translate | {<br>x? : number \| string,<br>y? : number \| string,<br>z? : number \| string<br>} | No| Translation of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>-**x**: distance to translate along the x-axis.<br>-**y**: distance to translate along the y-axis.<br>-**z**: distance to translate along the z-axis.<br>Since API version 9, this API is supported in ArkTS widgets.|
| scale | {<br>x? : number,<br>y? : number,<br>z? : number,<br>centerX? : number \| string,<br>centerY? : number \| string<br>} | No| Scaling of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>- **x**: scale factor along the x-axis.<br>- **y**: scale factor along the y-axis.<br>- **z**: scale factor along the z-axis.<br>- **centerX** and **centerY**: x coordinate and y coordinate of the scale center, respectively. The default values are both **"50%"**.<br>- If the center point is 0, it indicates the upper left corner of the component.<br>Since API version 9, this API is supported in ArkTS widgets.|
| rotate | {<br>x?: number,<br>y?: number,<br>z?: number,<br>angle?: number \| string,<br>centerX?: number \| string,<br>centerY?: number \| string<br>} | No| Rotation of the component during transition, which is the value of the start point of insertion and the end point of deletion.<br>- **x**: rotation vector along the x-axis.<br>- **y**: rotation vector along the y-axis.<br>- **z**: rotation vector along the z-axis.<br>- **centerX** and **centerY**: x coordinate and y coordinate of the rotation center, respectively. The default values are both **"50%"**.<br>- If the center point is (0, 0), it indicates the upper left corner of the component.<br>Since API version 9, this API is supported in ArkTS widgets.|
## Example
......
# 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,<br>{<br> duration?: number,<br> curve?: Curve \| string,<br> delay?: number,<br> motionPath?: <br>{<br> path: string,<br> form?: number,<br> to?: number,<br> rotatable?: boolean<br>},<br>zIndex?: number,<br>type?: [SharedTransitionEffectType](ts-appendix-enums.md#sharedtransitioneffecttype)<br>} | 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.<br>- **id**: component ID.<br>- **duration**: animation duration, in ms. The default duration is 1000 ms.<br>- **curve**: animation curve. The default curve is **Linear**. For details about the valid values, see [Curve](ts-animatorproperty.md).<br>- **delay**: Delay of animation playback, in ms. By default, the playback is not delayed.<br>- **motionPath**: motion path information. For details, see [Motion Path Animation](ts-motion-path-animation.md).<br>- **path**: path.<br>- **from**: start value.<br>- **to**: end value.<br>- **rotatable**: whether to rotate.<br>- **zIndex**: z-axis.<br>- **type**: animation type.|
| sharedTransition | id: string,<br>{<br> duration?: number,<br> curve?: Curve \| string,<br> delay?: number,<br> motionPath?: <br>{<br> path: string,<br> form?: number,<br> to?: number,<br> rotatable?: boolean<br>},<br>zIndex?: number,<br>type?: [SharedTransitionEffectType](ts-appendix-enums.md#sharedtransitioneffecttype)<br>} | 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.<br>- **id**: component ID.<br>- **duration**: animation duration.<br>Default value: **1000**<br>Unit: ms<br>Value range: [0, +∞)<br>The value **0** indicates that no animation is applied. A value less than 0 evaluates to the value **0**.<br>- **curve**: animation curve. The default curve is **Linear**. For details about the valid values, see [Curve](ts-animatorproperty.md).<br>- **delay**: animation delay.<br>Default value: **0**<br>Unit: ms<br>Value range: [0, +∞)<br>A value less than 0 evaluates to the value **0**.<br>- **motionPath**: motion path information. For details, see [Motion Path Animation](ts-motion-path-animation.md).<br>- **path**: path.<br>- **from**: start value.<br>- **to**: end value.<br>- **rotatable**: whether to rotate.<br>- **zIndex**: z-axis.<br>- **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
......
......@@ -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.<br>Default value: **Alignment.Center**<br>Since API version 9, this API is supported in ArkTS widgets.|
| direction | [Direction](ts-appendix-enums.md#direction) | Horizontal layout of the component.<br>Default value: **Direction.Auto**<br>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.<br>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.<br>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.<br>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**.<br>Default value:<br>{<br>x: 0,<br>y: 0<br>}<br>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.<br>Default value:<br>{<br>x: 0,<br>y: 0<br>}<br>Since API version 9, this API is supported in ArkTS widgets.|
| alignRules<sup>9+</sup> | {<br>left?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) };<br>right?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) };<br>middle?: { anchor: string, align: [HorizontalAlign](ts-appendix-enums.md#horizontalalign) };<br>top?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) };<br>bottom?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) };<br>center?: { anchor: string, align: [VerticalAlign](ts-appendix-enums.md#verticalalign) }<br>} | Alignment rules relative to the container. This attribute is valid only when the container is [\<RelativeContainer>](ts-container-relativecontainer.md).<br>- **left**: left-aligned.<br>- **right**: right-aligned.<br>- **middle**: center-aligned.<br>- **top**: top-aligned.<br>- **bottom**: bottom-aligned.<br>- **center**: center-aligned.<br>This API is supported in ArkTS widgets.<br>**NOTE**<br>- **anchor**: ID of the component that functions as the anchor point.<br>- **align**: alignment mode relative to the anchor component.|
......
......@@ -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.<br/>Default value: **false** |
| primaryButton | {<br>value: string,<br>action: () =&gt; void<br>} | No | Primary button.<br>**value**: text of the primary button in the popup.<br>**action**: callback for clicking the primary button.|
| secondaryButton | {<br>value: string,<br>action: () =&gt; void<br>} | No | Secondary button.<br>**value**: text of the secondary button in the popup.<br>**action**: callback for clicking the secondary button.|
| onStateChange | (event: { isVisible: boolean }) =&gt; void | No | Callback for the popup status change event.<br/>**isVisible**: whether the popup is visible. |
| arrowOffset<sup>9+</sup> | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. <br>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. <br/>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. <br/>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. |
| showInSubWindow<sup>9+</sup> | boolean | No | Whether to show the popup in the subwindow. <br/>Default value: **false** |
| mask<sup>10+</sup> | 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.<br/>Default value: **false** |
| primaryButton | {<br>value: string,<br>action: () =&gt; void<br>} | No | Primary button.<br>**value**: text of the primary button in the popup.<br>**action**: callback for clicking the primary button.|
| secondaryButton | {<br>value: string,<br>action: () =&gt; void<br>} | No | Secondary button.<br>**value**: text of the secondary button in the popup.<br>**action**: callback for clicking the secondary button.|
| onStateChange | (event: { isVisible: boolean }) =&gt; void | No | Callback for the popup status change event.<br/>**isVisible**: whether the popup is visible. |
| arrowOffset<sup>9+</sup> | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. <br>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. <br/>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. <br/>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. |
| showInSubWindow<sup>9+</sup> | boolean | No | Whether to show the popup in the subwindow. <br/>Default value: **false** |
| mask<sup>10+</sup> | 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.|
| messageOptions<sup>10+</sup> | [PopupMessageOptions](#popupmessageoptions10) | No | Parameters of the popup message.|
| targetSpace<sup>10+</sup> | [Length](ts-types.md#length) | No | Space between the popup and the target.|
## PopupMessageOptions<sup>10+</sup>
| 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.|
## CustomPopupOptions<sup>8+</sup>
| 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.<br>Default value: **Placement.Bottom** |
| popupColor | [ResourceColor](ts-types.md#resourcecolor) | No | Color of the popup. |
| enableArrow | boolean | No | Whether to display an arrow.<br>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.<br>Default value: **true**|
| enableArrow | boolean | No | Whether to display an arrow.<br>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.<br>Default value: **true**|
| autoCancel | boolean | No | Whether to automatically close the popup when an operation is performed on the page.<br>Default value: **true** |
| onStateChange | (event: { isVisible: boolean }) =&gt; void | No | Callback for the popup status change event.<br>**isVisible**: whether the popup is visible. |
| arrowOffset<sup>9+</sup> | [Length](ts-types.md#length) | No | Offset of the popup arrow relative to the popup. <br/>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. <br/>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. <br/>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. |
| showInSubWindow<sup>9+</sup> | boolean | No | Whether to show the popup in the subwindow.<br/>Default value: **false** |
| mask<sup>10+</sup> | 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.|
| targetSpace<sup>10+</sup> | [Length](ts-types.md#length) | No| Space between the popup and the target.|
## Example
```ts
......
......@@ -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.
# 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\<WebMessagePort>;
- Before change:
```ts
createWebMessagePorts(): Array<WebMessagePort>;
```
- After change:
```ts
createWebMessagePorts(isExtentionType?: boolean): Array<WebMessagePort>;
```
**Adaptation Guide**
N/A
......@@ -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
......
# 卡片数据交互说明
ArkTS卡片框架提供了updateForm()接口和requestForm()接口主动触发卡片的页面刷新。**(介绍下LocalStorageProp在这个过程中起到的作用)**
ArkTS卡片框架提供了updateForm()接口和requestForm()接口主动触发卡片的页面刷新。
![WidgetLocalStorageProp](figures/WidgetLocalStorageProp.png)
......
......@@ -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进行调度管理。
......
......@@ -57,13 +57,6 @@ FormExtensionAbility类拥有如下API接口,具体的API介绍详见[接口
| onConfigurationUpdate(config:&nbsp;Configuration):&nbsp;void | 当系统配置更新时调用。 |
| onShareForm?(formId:&nbsp;string):&nbsp;{&nbsp;[key:&nbsp;string]:&nbsp;any&nbsp;} | 卡片提供方接收卡片分享的通知接口。 |
FormExtensionAbility类还拥有成员context,为FormExtensionContext类,具体的API介绍详见[接口文档](../reference/apis/js-apis-inner-application-formExtensionContext.md)
| 接口名 | 描述 |
| -------- | -------- |
| startAbility(want:&nbsp;Want,&nbsp;callback:&nbsp;AsyncCallback&lt;void&gt;):&nbsp;void | 回调形式拉起一个卡片所属应用的UIAbility(系统接口,三方应用不支持调用,需申请后台拉起权限)。 |
| startAbility(want:&nbsp;Want):&nbsp;Promise&lt;void&gt; | 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数据中存在临时标记字段,表示此次请求的卡片是否为临时卡片:
......
......@@ -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
# 服务卡片开发指导(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
......@@ -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 | 应用临时文件路径 | 应用在本设备内部存储上仅在应用运行期间产生和需要的文件,应用退出后即清理。 |
对于上述各类应用文件路径,常见使用场景如下:
......
......@@ -2,7 +2,7 @@
在操作系统中,存在各种各样的数据,按数据结构可分为:
- 结构化数据:能够用统一的数据模型加以描述的数据。常见的是各类数据库数据。在应用开发中,对结构化数据的开发活动隶属于数据管理模块
- 结构化数据:能够用统一的数据模型加以描述的数据。常见的是各类数据库数据。在应用开发中,对结构化数据的开发活动隶属于[数据管理模块](../database/data-mgmt-overview.md)
- 非结构化数据:指数据结构不规则或不完整,没有预定义的数据结构/模型,不方便用数据库二维逻辑表来表现的数据。常见的是各类文件,如文档、图片、音频、视频等。在应用开发中,对非结构化数据的开发活动隶属于文件管理模块,将在下文展开介绍。
......
# 设置分布式文件数据等级
不同设备本身的安全能力差异较大,一些小的嵌入式设备安全能力远弱于平板等设备类型。用户或者应用不同的文件数据有不同安全诉求,例如个人的健康信息和银行卡信息等不期望被弱设备读取。因此,OpenHarmony提供一套完整的数据分级、设备分级标准,并针对不同设备制定不同的数据流转策略。
不同设备本身的安全能力差异较大,一些小的嵌入式设备安全能力远弱于平板等设备类型。用户或者应用不同的文件数据有不同安全诉求,例如个人的健康信息和银行卡信息等不期望被弱设备读取。因此,OpenHarmony提供一套完整的数据分级、设备分级标准,并针对不同设备制定不同的数据流转策略,具体规则请参见[数据、设备安全分级](../database/access-control-by-device-and-data-level.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) => {
......
......@@ -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)
......@@ -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:壁纸扩展能力,用于实现桌面壁纸。预留能力,当前暂未支持。 |
......
......@@ -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\<ColorPicker>
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------- | ---- | -------------------------- |
| 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\<ColorPicker>)
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------ | ---- | -------------------------- |
| 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实例。 |
**示例:**
......
......@@ -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
### setOrCreate<sup>9+</sup>
setOrCreate&lt;T&gt;(propName: string, newValue?: T): boolean
setOrCreate&lt;T&gt;(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<number> = storage.setAndLink('PropA', 50);
### prop<sup>9+</sup>
prop&lt;T&gt;(propName: string): SubscribedAbstractProperty&lt;T&gt;
prop&lt;S&gt;(propName: string): SubscribedAbstractProperty&lt;S&gt;
如果给定的propName在LocalStorage存在,则返回与LocalStorage中propName对应属性的单向绑定数据。如果LocalStorage中不存在propName,则返回undefined。单向绑定数据的修改不会被同步回LocalStorage中。
......@@ -587,7 +587,7 @@ prop&lt;T&gt;(propName: string): SubscribedAbstractProperty&lt;T&gt;
| 类型 | 描述 |
| ----------------------------------- | ---------------------------------------- |
| SubscribedAbstractProperty&lt;T&gt; | SubscribedAbstractProperty&lt;T&gt;的实例,如果AppStorage不存在对应的propName,在返回undefined。 |
| SubscribedAbstractProperty&lt;S&gt; | SubscribedAbstractProperty&lt;S&gt;的实例,如果AppStorage不存在对应的propName,在返回undefined。 |
```ts
......@@ -600,7 +600,7 @@ prop1.set(1); // one-way sync: prop1.get()=1; but prop2.get() == 47
### setAndProp<sup>9+</sup>
setAndProp&lt;T&gt;(propName: string, defaultValue: T): SubscribedAbstractProperty&lt;T&gt;
setAndProp&lt;S&gt;(propName: string, defaultValue: S): SubscribedAbstractProperty&lt;S&gt;
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&lt;T&gt; | SubscribedAbstractProperty&lt;T&gt;的实例,和AppStorage中propName对应属性的单向绑定的数据。 |
| SubscribedAbstractProperty&lt;S&gt; | SubscribedAbstractProperty&lt;S&gt;的实例,和AppStorage中propName对应属性的单向绑定的数据。 |
```ts
......
......@@ -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)
......@@ -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)
- 添加组件
- 添加常用组件
......
......@@ -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)
......
......@@ -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)
# 耗电统计定制开发指导
## 概述
### 简介
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使用的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 触发次数 * 耗电基准 |
| bluetooth_br_on | Bluetooth | Double | 蓝牙开启时的基准耗电量,用于计算蓝牙开启过程中的功耗。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| bluetooth_br_scan | Bluetooth | Double | 蓝牙扫描状态的基准耗电量,用于计算蓝牙扫描过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| bluetooth_ble_on | Bluetooth | Double | 低功耗蓝牙开启时的基准耗电量,用于计算蓝牙开启过程中的功耗。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| bluetooth_ble_scan | Bluetooth | Double | 低功耗蓝牙扫描状态的基准耗电量,用于计算蓝牙扫描过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| wifi_on | WIFI | Double | WIFI开启时的基准耗电量,用于计算WIFI开启过程中的功耗。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| wifi_scan | WIFI | Double | WIFI扫描一次耗电量,用于计算WIFI扫描时的功耗。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 触发次数 * 耗电基准 |
| radio_on | Phone | Double数组 | 通话开启时的基准耗电量,数组形式,用于配置不同等级信号强度的基准耗电量。默认配置包括4个信号等级的基准耗电信息。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| radio_data | Phone | Double数组 | 网络开启时的基准耗电量,数组形式,用于配置不同等级信号强度的基准耗电量。默认配置包括4个信号等级的基准耗电信息。<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| camera_on | Camera | Double | 相机开启时的基准耗电量,用于计算相机开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| flashlight_on | Flashlight | Double | 闪光灯开启时的基准耗电量,用于计算闪光灯开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| gnss_on | GNSS | Double | GNSS(Global Navigation Satellite System)开启时的基准耗电量,用于计算GNSS开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| sensor_gravity_on | Gravity Sensor | Double | 重力传感器开启时的基准耗电量,用于计算重力传感器开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| sensor_proximity_on | Proximity Sensor | Double | 接近传感器开启时的基准耗电量,用于计算接近传感器开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| audio_on | Audio | Double | 音响开启时的基准耗电量,用于计算音响开启过程中的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| screen_on<br/>screen_brightness | Screen | Double | screen_on:屏幕的基础状态下的基准耗电量(不包括屏幕亮度产生的耗电量);<br/>screen_brightness:屏幕亮度每提升一个等级,需要额外增加的基准耗电量;<br/>例如:假定条件,screen_on = 90,screen_brightness = 2,屏幕亮度为100,屏幕亮度100时的基准耗电量:90 + 2 * 100 = 290<br/>-&nbsp;功耗类型:硬件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| cpu_awake | CPU | Double | CPU唤醒锁持锁状态时的基准耗电量,用于计算CPU唤醒锁持锁状态时的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| cpu_idle | CPU | Double | CPU空闲状态时的基准耗电量,用于计算CPU空闲状态的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| cpu_suspend | CPU | Double | CPU休眠状态时的基准耗电量,用于计算CPU休眠状态的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| cpu_active | CPU | Double | CPU活动状态时的基准耗电量,用于计算CPU活动状态的功耗。<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
| cpu_clusters<br/>cpu_speed_clusterX | CPU | Double数组 | cpu_clusters:cpu cluster的基准耗电量,数组形式,用于配置不同cpu cluster基准耗电量。默认配置包括3个不同cpu cluster基准耗电信息。<br/>cpu_speed_clusterX:cpu cluster不同频率的基准耗电量,数组形式。X代表序号,默认配置中X的范围0~2,对应cpu_clusters数组大小。例如:默认配置cpu_clusters的数组大小为3,顺序对应配置项cpu_speed_cluster0、cpu_speed_cluster1、cpu_speed_cluster2。<br/>-&nbsp;扩展性:可扩展<br/>-&nbsp;功耗类型:软件功耗<br/>-&nbsp;统计方法:耗电量 = 持续时间 * 耗电基准 |
>说明:表格中描述的硬件类型为真实硬件名称,不代表耗电统计类型,具体的耗电统计类型,请参考[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
......@@ -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
......
......@@ -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) | 面向应用开发者提供,不包含需要使用系统权限的系统接口。<br />通过DevEco Studio默认获取的SDK为Public SDK。 |
| HUAWEI DevEco Studio(可选) | 3.1 Beta1 | OpenHarmony应用开发推荐使用。 <br />[请点击此处获取](https://developer.harmonyos.com/cn/develop/deveco-studio#download) |
| HUAWEI DevEco Device Tool(可选) | 3.1 Beta2 | OpenHarmony智能设备集成开发环境推荐使用。 <br />[请点击此处获取](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处理能力。<br/>- 新增支持公共数据的临时授权和统一的打开入口。<br/>主要涉及以下需求:<br/>I687C8【新增能力】支持应用文件统一URI处理能力<br/>I64U8W【基础能力】支持公共数据的临时授权和统一open入口 | NA |
| 元能力 | - 新增常驻进程重启优化。<br/>- 支持卡片数据库切换。<br/>- 支持异步onConnected等能力。<br/>主要涉及以下需求:<br/>I65M3F 【基础能力】执行ShellCommand命令管控<br/>I65V83 【基础能力】ServiceExtensionAbility支持异步onConnected生命周期<br/>I61H21 【基础能力】卡片本地数据库切换<br/>I63UJ5 【元能力】【ability_runtime】API8及以前API 支持异常处理<br/>I6BDCW 【基础能力】应用加载禁止加载data目录下的代码<br/>I6BDDU 【基础能力】FA模型默认启动方式为Standard<br/>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)仓了解更多信息。
## 修复缺陷列表
......
# 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)
# 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)
# 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)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册