From f62400e3648e4fe431a7b38bda01964a4f5e561e Mon Sep 17 00:00:00 2001 From: esterzhou Date: Tue, 6 Sep 2022 19:29:31 +0800 Subject: [PATCH] update docs (8236) Signed-off-by: esterzhou --- .../reference/arkui-ts/ts-animatorproperty.md | 47 ++- .../ts-basic-components-imageanimator.md | 75 ++--- .../arkui-ts/ts-basic-components-scrollbar.md | 40 +-- .../arkui-ts/ts-basic-components-text.md | 21 +- .../reference/arkui-ts/ts-container-column.md | 25 +- .../reference/arkui-ts/ts-container-flex.md | 37 +-- .../reference/arkui-ts/ts-container-row.md | 27 +- .../reference/arkui-ts/ts-container-scroll.md | 44 +-- .../arkui-ts/ts-drawing-components-shape.md | 62 ++-- .../arkui-ts/ts-explicit-animation.md | 61 ++-- .../ts-transition-animation-component.md | 48 ++- .../ts-universal-attributes-background.md | 16 +- .../ts-universal-attributes-border.md | 23 +- .../ts-universal-attributes-gradient-color.md | 28 +- .../ts-universal-attributes-hover-effect.md | 22 +- .../arkui-ts/ts-universal-attributes-menu.md | 19 +- .../ts-universal-attributes-text-style.md | 25 +- .../ts-universal-attributes-visibility.md | 10 +- .../arkui-ts/ts-universal-events-key.md | 21 +- .../arkui-ts/ts-universal-events-touch.md | 14 +- .../arkui-ts/ts-universal-mouse-key.md | 25 +- en/application-dev/ui/ts-types.md | 283 +++++++++++------- 22 files changed, 423 insertions(+), 550 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md index de967be1f6..e6c2c03cee 100644 --- a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md +++ b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md @@ -1,44 +1,31 @@ -# AnimatorProperty +# Property Animator +You can create a property animator to animate the universal attributes of a component. > **NOTE** > -> This animation is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. +> 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.| -When the universal attributes of a component change, you can create an **AnimatorProperty** for gradient to improve user experience. +## AnimateParam +- Attributes -| Name | Type | Default Value | Description | -| -------- | -------- | -------- | -------- | -| duration | number | 1000 | Animation duration, in ms. The default duration is 1000 ms. | -| curve | 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-enums) | PlayMode.Normal | Playback mode. By default, the animation is played from the beginning after the playback is complete. | - -- Curve enums - | Name | Description | - | -------- | -------- | - | Linear | The animation speed keeps unchanged. | - | Ease | The animation starts at a low speed and then accelerates. It slows down before the animation ends. The cubic-bezier curve (0.25, 0.1, 0.25, 1.0) is used. | - | EaseIn | The animation starts at a low speed. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used. | - | EaseOut | The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used. | - | EaseInOut | The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used. | - | FastOutSlowIn | The animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0). | - | LinearOutSlowIn | The animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0). | - | FastOutLinearIn | The animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0). | - | ExtremeDeceleration | The animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0). | - | Sharp | The animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0). | - | Rhythm | The animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0). | - | Smooth | The animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0). | - | Friction | Damping curve. The cubic-bezier curve (0.2, 0.0, 0.2, 1.0) is used. | +| 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.| ## Example - ```ts // xxx.ets @Entry @@ -67,8 +54,8 @@ struct AttrAnimationExample { curve: Curve.EaseOut, // Animation curve delay: 500, // Animation delay iterations: 1, // Number of playback times - playMode: PlayMode.Normal // Animation mode - }) // Animation configuration for the width and height attributes of the Button component + playMode: PlayMode.Normal // Animation playback mode + }) // Animation configuration for the width and height attributes of the