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