From 90f6344fc667289af0c4c774d0c0533887c15ef2 Mon Sep 17 00:00:00 2001 From: LiAn Date: Wed, 23 Mar 2022 06:18:27 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md. Signed-off-by: LiAn --- .../apis/js-apis-basic-features-animator.md | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md b/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md index 2386d8d3a4..9a5fd6fe76 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md +++ b/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md @@ -100,11 +100,12 @@ update(options: AnimatorOptions): void animator.update(options); ``` - ### play play(): void +启动动画。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **示例:** @@ -116,6 +117,8 @@ animator.play(); finish(): void +结束动画。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **示例:** @@ -127,6 +130,8 @@ animator.finish(); pause(): void +暂停动画。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **示例:** @@ -138,6 +143,8 @@ animator.pause(); cancel(): void +删除动画。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full **示例:** @@ -149,33 +156,71 @@ animator.cancel(); reverse(): void +以相反的顺序播放动画。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full +**示例:** +``` +animator.reverse(); +``` + ### onframe onframe: (progress: number) => void +回调时触发。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | progress | number | 是 | 动画的当前进度。| + +**示例:** +``` +animator.onframe(); +``` ### onfinish onfinish: () => void +动画完成。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full +**示例:** +``` +animator.onfinish(); +``` + ### oncancel oncancel: () => void +动画被取消。 + **系统能力:** SystemCapability.ArkUI.ArkUI.Full +**示例:** +``` +animator.oncancel(); +``` + ### onrepeat onrepeat: () => void **系统能力:** SystemCapability.ArkUI.ArkUI.Full +**示例:** +``` +animator.onrepeat(); +``` + +动画将重复。 ## AnimatorOptions -- GitLab