修改README待实现特性

Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
zgf
2024-08-15 14:44:38 +08:00
parent 48b425109a
commit bebbc865f7
2 changed files with 17 additions and 9 deletions

View File

@@ -19,7 +19,22 @@ import { AnimatorOption, ImageKnifeAnimatorComponent,ImageKnifeOption } from "@o
struct ImageAnimatorPage {
@Local animatorOption: AnimatorOption = new AnimatorOption({
state: AnimationStatus.Running,
iterations: -1
iterations: -1,
onFinish:()=>{
console.log("ImageKnifeAnimatorComponent animatorOption onFinish")
},
onStart:()=>{
console.log("ImageKnifeAnimatorComponent animatorOption onStart")
},
onPause:()=>{
console.log("ImageKnifeAnimatorComponent animatorOption onPause")
},
onCancel:()=>{
console.log("ImageKnifeAnimatorComponent animatorOption onCancel")
},
onRepeat:()=>{
console.log("ImageKnifeAnimatorComponent animatorOption onRepeat")
}
})
@Local animatorOption1: AnimatorOption = new AnimatorOption({
state: AnimationStatus.Initial
@@ -33,15 +48,9 @@ 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