提交 915cb6c8 编写于 作者: E ester.zhou

update doc

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 9503c250
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **&lt;ImageAnimator&gt;** component enables images to be played frame by frame. The list of images to be played can be configured, and the duration of each image can be configured. The **\<ImageAnimator>** component enables images to be played frame by frame. The list of images to be played can be configured, and the duration of each image can be configured.
## Required Permissions ## Required Permissions
...@@ -15,7 +15,7 @@ None ...@@ -15,7 +15,7 @@ None
## Child Components ## Child Components
None Not supported
## APIs ## APIs
...@@ -37,29 +37,29 @@ ImageAnimator() ...@@ -37,29 +37,29 @@ ImageAnimator()
| iterations | number | 1 | No | By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. | | iterations | number | 1 | No | By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. |
- AnimationStatus enums - AnimationStatus enums
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| Initial | The animation is in the initial state. | | Initial | The animation is in the initial state. |
| Running | The animation is being played. | | Running | The animation is being played. |
| Paused | The animation is paused. | | Paused | The animation is paused. |
| Stopped | The animation is stopped. | | Stopped | The animation is stopped. |
- FillMode enums - FillMode enums
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| None | After the playback is complete, the animation restores to the initial state. | | 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. | | Forwards | After the playback is complete, the animation remains in the end state. |
## Events ## Events
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- | -------- |
| onStart() =&gt; void | Triggered when the animation starts to play. | | onStart() =&gt; void | Triggered when the animation starts to play. |
| onPause() =&gt; void | Triggered when the animation playback is paused. | | onPause() =&gt; void | Triggered when the animation playback is paused. |
| onRepeat() =&gt; void | Triggered when the animation playback is repeated. | | onRepeat() =&gt; void | Triggered when the animation playback is repeated. |
| onCancel() =&gt; void | Triggered when the animation playback is canceled. | | onCancel() =&gt; void | Triggered when the animation playback is canceled. |
| onFinish() =&gt; void | Triggered when the animation playback is complete. | | onFinish() =&gt; void | Triggered when the animation playback is complete. |
## Example ## Example
...@@ -78,6 +78,7 @@ struct ImageAnimatorExample { ...@@ -78,6 +78,7 @@ struct ImageAnimatorExample {
ImageAnimator() ImageAnimator()
.images([ .images([
{ {
// The comment folder is at the same level as the pages folder.
src: '/comment/bg1.jpg', src: '/comment/bg1.jpg',
duration: 500, duration: 500,
width: 325, width: 325,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册