From 6c17db13d5ead3389fbaeaab1d145961b8f90342 Mon Sep 17 00:00:00 2001 From: zgf Date: Wed, 14 Aug 2024 17:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8A=A8=E5=9B=BE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=96=B0=E5=A2=9E=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=BC=93=E5=AD=98=E6=95=B0=E9=87=8F=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zgf --- README.md | 2 +- entry/src/main/ets/pages/ImageAnimatorPage.ets | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 201c34f..bb91e0e 100644 --- a/README.md +++ b/README.md @@ -279,7 +279,7 @@ ImageKnifeAnimatorComponent({ | iterations | number | 播放次数(可选) | | reverse | boolean | 播放顺序(可选) | | onStart | ()=>void | 动画开始播放时触发(可选) | -| onFinsh | ()=>void | 动画播放完成时或者停止播放时触发(可选) | +| onFinish | ()=>void | 动画播放完成时或者停止播放时触发(可选) | | onPause | ()=>void | 动画暂停播放时触发(可选) | | onCancel | ()=>void | 动画返回最初状态时触发(可选) | | onRepeat | ()=>void | 动画重复播放时触发(可选) | diff --git a/entry/src/main/ets/pages/ImageAnimatorPage.ets b/entry/src/main/ets/pages/ImageAnimatorPage.ets index bd67974..4efadcb 100644 --- a/entry/src/main/ets/pages/ImageAnimatorPage.ets +++ b/entry/src/main/ets/pages/ImageAnimatorPage.ets @@ -33,9 +33,15 @@ struct ImageAnimatorPage { Flex(){ Button("播放").onClick(()=>{ this.animatorOption.state = AnimationStatus.Running + this.animatorOption.onStart = ()=>{ + console.log("ImageKnifeAnimatorComponent animatorOption onStart") + } }) Button("暂停").onClick(()=>{ this.animatorOption.state = AnimationStatus.Paused + this.animatorOption.onFinish = ()=>{ + console.log("ImageKnifeAnimatorComponent animatorOption onFinish") + } }) Button("停止").onClick(()=>{ this.animatorOption.state = AnimationStatus.Stopped