diff --git a/en/application-dev/faqs/faqs-ui-ets.md b/en/application-dev/faqs/faqs-ui-ets.md index 61fe069fcf25e8e5ae2a5ff4078a3952ad468447..fd21421cd95edc2bc838b8401724fae10448d9fd 100644 --- a/en/application-dev/faqs/faqs-ui-ets.md +++ b/en/application-dev/faqs/faqs-ui-ets.md @@ -14,7 +14,7 @@ Below are the restrictions on using generator functions in TypeScript: - The generator function cannot contain local variables. -None of the above restrictions apply to anonymous function implementations of event handlers (such as **onClick**) +None of the above restrictions apply to anonymous function implementations of event handlers (such as **onClick**). Negative example: diff --git a/en/application-dev/reference/arkui-ts/Readme-EN.md b/en/application-dev/reference/arkui-ts/Readme-EN.md index 4ed91abbcccddf2c639302c6f6524e257303e6e8..9f7f8eee53a8010ef0a5ee0dfd860af3b503ec8d 100644 --- a/en/application-dev/reference/arkui-ts/Readme-EN.md +++ b/en/application-dev/reference/arkui-ts/Readme-EN.md @@ -38,7 +38,9 @@ - [Component ID](ts-universal-attributes-component-id.md) - [Touch Target](ts-universal-attributes-touch-target.md) - [Polymorphic Style](ts-universal-attributes-polymorphic-style.md) + - [Hit Test Control](ts-universal-attributes-hit-test-behavior.md) - [Background Blur](ts-universal-attributes-backgroundBlurStyle.md) + - [restoreId](ts-universal-attributes-restoreId.md) - Gesture Processing - [Gesture Binding Methods](ts-gesture-settings.md) - Basic Gestures @@ -97,10 +99,13 @@ - [Counter](ts-container-counter.md) - [Flex](ts-container-flex.md) - [GridContainer](ts-container-gridcontainer.md) + - [GridCol](ts-container-gridcol.md) + - [GridRow](ts-container-gridrow.md) - [Grid](ts-container-grid.md) - [GridItem](ts-container-griditem.md) - [List](ts-container-list.md) - [ListItem](ts-container-listitem.md) + - [ListItemGroup](ts-container-listitemgroup.md) - [Navigator](ts-container-navigator.md) - [Panel](ts-container-panel.md) - [Refresh](ts-container-refresh.md) diff --git a/en/application-dev/reference/arkui-ts/figures/defaultFocus.png b/en/application-dev/reference/arkui-ts/figures/defaultFocus.png new file mode 100644 index 0000000000000000000000000000000000000000..7d0187576fd77ab563034561f5b862bf232ac51d Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/defaultFocus.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png new file mode 100644 index 0000000000000000000000000000000000000000..f5cd637e5bf9db13e3334ca00413e3a91412c813 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png new file mode 100644 index 0000000000000000000000000000000000000000..f1b942fee8437b1197ef3e9f40c98187a76f8c44 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png new file mode 100644 index 0000000000000000000000000000000000000000..f1b942fee8437b1197ef3e9f40c98187a76f8c44 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png new file mode 100644 index 0000000000000000000000000000000000000000..05e44b9914ea290f512ed0c2cbc3502b584cd0af Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png new file mode 100644 index 0000000000000000000000000000000000000000..06cbacf1470de12c79c2020aa8c6be95506e58b5 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png new file mode 100644 index 0000000000000000000000000000000000000000..9c68b723dd3966886d384028663d4a7d6633c027 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png new file mode 100644 index 0000000000000000000000000000000000000000..7dbcbb2d5710b17866b9d5b034437b91a700a3f9 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png new file mode 100644 index 0000000000000000000000000000000000000000..60f430b646b45a3e3b16a9bb024e4a14e48bf4d3 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png new file mode 100644 index 0000000000000000000000000000000000000000..60f430b646b45a3e3b16a9bb024e4a14e48bf4d3 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg b/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ca0ec86c6c71b6c6daa60bf3ee43795f33568c64 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg differ diff --git a/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png b/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png new file mode 100644 index 0000000000000000000000000000000000000000..afc9d772307fd103ac57f11211f0c188e82f46b2 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/grid-autofill.png b/en/application-dev/reference/arkui-ts/figures/grid-autofill.png new file mode 100644 index 0000000000000000000000000000000000000000..c45eee033be4548744fd84bbcb5ba29d17868e69 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/grid-autofill.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/gridrow.png b/en/application-dev/reference/arkui-ts/figures/gridrow.png new file mode 100644 index 0000000000000000000000000000000000000000..ec3c488eed555b83c695c233db992e69c4af639a Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/gridrow.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png new file mode 100644 index 0000000000000000000000000000000000000000..12eeaab8f9f0f2b4aa9cb619b0fd07776dc18bd9 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png new file mode 100644 index 0000000000000000000000000000000000000000..f1cc053a757c9020a0f53fcb3a5076eed7df5c8a Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png new file mode 100644 index 0000000000000000000000000000000000000000..115c022b24345fe60008367665feae57ec9fc18f Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/image-effect.png b/en/application-dev/reference/arkui-ts/figures/image-effect.png new file mode 100644 index 0000000000000000000000000000000000000000..fc2c9b7d49f7d698aac11d2ede6b0cc58222c7ca Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/image-effect.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus1.png b/en/application-dev/reference/arkui-ts/figures/requestFocus1.png new file mode 100644 index 0000000000000000000000000000000000000000..0a0d6cedda78aa62c8d8305686cb651940d9ad52 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus1.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus2.png b/en/application-dev/reference/arkui-ts/figures/requestFocus2.png new file mode 100644 index 0000000000000000000000000000000000000000..240db2460748f04d64fa7198b749ee95a8a16a48 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus2.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus3.png b/en/application-dev/reference/arkui-ts/figures/requestFocus3.png new file mode 100644 index 0000000000000000000000000000000000000000..7aa241956ef0e9c2edfdbb683f8e3d1306ac7349 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus3.png differ diff --git a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md index e6c2c03cee6bc7d7daa9511fce2ee4a5ef0e0c4a..b390dc8ead870e17ad37c02632295e1f2e414bfc 100644 --- a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md +++ b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md @@ -1,27 +1,27 @@ # Property Animator -You can create a property animator to animate the universal attributes of a component. +You can create a property animator to animate certain universal attributes of a component, including **width**, **height**, backgroundColor, **opacity**, **scale**, **rotate**, and **translate**. > **NOTE** > > This event is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. -| API | Description | -| ------------------------------ | ------------------------------------------------------------ | -| animation(value: AnimateParam) | Applies a property animator to this component to control the transition of the component from one state to another.| +animation(value: {duration?: number, tempo?: number, curve?: string | Curve | ICurve, delay?:number, iterations: number, playMode?: PlayMode, onFinish?: () => void}) -## AnimateParam +Applies a property animator to the component to animate its attributes over time. -- Attributes +**Parameters** -| Name | Type | Default Value | Description | -| ---------- | ---------------------------------------- | --------------- | ----------------------- | -| duration | number | 1000 | Animation duration, in ms. The default duration is 1000 ms. | -| curve | [Curve](ts-appendix-enums.md#curve) | Curve.Linear | Animation curve. The default curve is linear. | -| delay | number | 0 | Delay of animation playback, in ms. By default, the playback is not delayed. | -| iterations | number | 1 | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. | -| playMode | [PlayMode](ts-appendix-enums.md#playmode) | PlayMode.Normal | Animation playback mode. By default, the animation is played from the beginning after the playback is complete.| +| Name | Type | Mandatory | Description | +| ---------- | ------------------------------------------| ---- | ------------------------------------------------------------ | +| duration | number | No | Animation duration, in ms.
Default value: **1000**| +| tempo | number | No | Animation playback speed. A greater value indicates a higher animation playback speed.
The value **0** indicates that no animation is applied.
Default value: **1**| +| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve9+ | No | Animation curve.
Default value: **Curve.Linear** | +| delay | number | No | Delay of animation playback, in ms. The value **0** indicates that the playback is not delayed.
Default value: **0** | +| iterations | number | No | Number of times that the animation is played. The value **-1** indicates that the animation is played for an unlimited number of times.
Default value: **1**| +| playMode | [PlayMode](ts-appendix-enums.md#playmode) | No | Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
Default value: **PlayMode.Normal**| +| onFinish | () => void | No | Callback invoked when the animation playback is complete. | ## Example @@ -31,9 +31,9 @@ You can create a property animator to animate the universal attributes of a comp @Entry @Component struct AttrAnimationExample { - @State widthSize: number = 200 - @State heightSize: number = 100 - @State flag: boolean = true + @State widthSize: number = 200; + @State heightSize: number = 100; + @State flag: boolean = true; build() { Column() { diff --git a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md index c6b823d9d0b560ca1b3c157f715c2e93df4a2ad9..f1bce5a8cc619c0e72e1bff539b311d355c23755 100644 --- a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md +++ b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md @@ -8,6 +8,7 @@ | Blue | 0x0000ff | ![en-us_image_0000001174104404](figures/en-us_image_0000001174104404.png) | | Brown | 0xa52a2a | ![en-us_image_0000001219744201](figures/en-us_image_0000001219744201.png) | | Gray | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | +| Grey | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | | Green | 0x008000 | ![en-us_image_0000001174422914](figures/en-us_image_0000001174422914.png) | | Orange | 0xffa500 | ![en-us_image_0000001219662661](figures/en-us_image_0000001219662661.png) | | Pink | 0xffc0cb | ![en-us_image_0000001219662663](figures/en-us_image_0000001219662663.png) | @@ -70,6 +71,7 @@ | Press | The mouse button is pressed.| | Release | The mouse button is released.| | Move | The mouse cursor moves. | +| Hover | The mouse pointer is hovered on an element. | ## Curve @@ -100,10 +102,12 @@ ## FillMode -| Name | Description | -| -------- | -------------------------------- | -| None | After the playback is complete, the animation restores to the initial state. | -| Forwards | After the playback is complete, the animation remains in the end state.| +| Name | Description | +| --------- | ------------------------------------------------------------ | +| None | Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state.| +| Forwards | The target component retains the state set by the last keyframe encountered during execution of the animation. | +| Backwards | The animation applies the values defined in the first relevant keyframe once it is applied to the target component, and retains the values during the period set by **delay**. The first relevant keyframe depends on the value of **playMode**. If **playMode** is **Normal** or **Alternate**, the first relevant keyframe is in the **from** state. If **playMode** is **Reverse** or **AlternateReverse**, the first relevant keyframe is in the **to** state.| +| Both | The animation follows the rules for both **Forwards** and **Backwards**, extending the animation attributes in both directions.| ## PlayMode @@ -133,11 +137,11 @@ | Name | Description | | -------- | ---------------------- | | Top | Top edge in the vertical direction. | -| Center | Center position in the vertical direction. | +| Center(deprecated) | Center position in the vertical direction.
This API is deprecated since API version 9. | | Bottom | Bottom edge in the vertical direction. | -| Baseline | Text baseline position in the cross axis direction.| +| Baseline(deprecated) | Text baseline position in the cross axis direction.
This API is deprecated since API version 9.| | Start | Start position in the horizontal direction. | -| Middle | Center position in the horizontal direction. | +| Middle(deprecated) | Center position in the horizontal direction.
This API is deprecated since API version 9. | | End | End position in the horizontal direction. | ## Week @@ -217,9 +221,9 @@ | Name | Description | | ------ | -------------------- | -| Butt | The ends of dividing lines are butt.| -| Round | The ends of dividing lines are rounded. | -| Square | The ends of dividing lines are butt.| +| Butt | The ends of the line are squared off, and the line does not extend beyond its two endpoints.| +| Round | The line is extended at the endpoints by a half circle whose diameter is equal to the line width.| +| Square | The line is extended at the endpoints by a rectangle whose width is equal to half the line width and height equal to the line width.| ## Axis @@ -251,12 +255,12 @@ | 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 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. | ## FlexDirection @@ -271,9 +275,9 @@ | Name | Description | | ----------- | ------------------------------------------------- | -| NoWrap | The child components in the **\** component are arranged in a single line, and they cannot overflow. | -| Wrap | The child components in the **\** component are arranged in multiple lines, and they may overflow. | -| WrapReverse | The child components in the **\** component are reversely arranged in multiple lines, and they may overflow.| +| NoWrap | The child components in the flex container are arranged in a single line, and they cannot overflow. | +| Wrap | The child components in the flex container are arranged in multiple lines, and they may overflow. | +| WrapReverse | The child components in the flex container are reversely arranged in multiple lines, and they may overflow.| ## VerticalAlign @@ -417,7 +421,7 @@ | Name | Description | | ----------- | -------------------- | -| Default | Both the node and its child node respond to the hit test of a touch event, and other nodes blocked by the node are not considered during the hit test. | -| Block | The node responds to the hit test of a touch event, and its child node and other nodes blocked by the node are not considered during the hit test. | -| Transparent | Both the node and its child node respond to the hit test of a touch event, and other nodes blocked by the node are also considered during the hit test.| -| None | The node does not respond to the hit test of a touch event, but its child nodes are considered during the hit test.| +| Default | Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test. | +| Block | The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test. | +| Transparent | Both the node and its child node respond to the hit test of a touch event, and its sibling node is also considered during the hit test.| +| None | The node does not respond to the hit test of a touch event, but its child node and sibling node are considered during the hit test.| diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md b/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md index cf0d15783bfbea489139f8558335084ba5096208..0e378d40462e6913ac5bc79f1b5c157803f17ac7 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-blank.md @@ -1,17 +1,10 @@ # Blank +The **\** component is able to automatically fill the empty spaces in the container along the main axis. It is valid only when the parent component is **\** or **\**. -> **NOTE** +> **NOTE** > -> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. - - -The **\** component supports automatic filling of the empty part of the container along the main axis. This component is valid only when the parent component is **\** or **\**. - - -## Required Permissions - -None +> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. ## Child Components @@ -21,28 +14,25 @@ Not supported ## APIs -Blank(min?: Length) +Blank(min?: number | string) -- Parameters - | Name | Type | Mandatory | Default Value | Description | - | -------- | -------- | -------- | -------- | -------- | - | min | [Length](../../ui/ts-types.md) | No | 0 | Minimum size of the **<Blank>** component in the container along the main axis. | +**Parameters** +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| min | number \| string | No| Minimum size of the **\** component in the container along the main axis.
Default value: **0**| ## Attributes -| Name | Type | Default Value | Description | -| -------- | -------- | -------- | -------- | -| color | [ResourceColor](../../ui/ts-types.md) | 0xffffff | Color to fill the blank. | +In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. -> **NOTE** -> -> Universal attribute methods are not supported. +| Name| Type| Description| +| -------- | -------- | -------- | +| color | [ResourceColor](ts-types.md#resourcecolor) | Color to fill the empty spaces.| ## Example - ```ts // xxx.ets @Entry diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-button.md b/en/application-dev/reference/arkui-ts/ts-basic-components-button.md index 5f7d75d5406fd705e5a0716ff9d94fd3dd73de22..fa5705777b76c6c4e94e261efbda40a64054c991 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-button.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-button.md @@ -2,70 +2,63 @@ The **\