还请试下使用animateTo实现:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-explicit-animation-V5如:@State imageAngle: number = 0 build() { Column() { Image($r('app.media.startIcon')).width(200).height(200) .rotate({ z: 1, angle: this.imageAngle }) .onAppear(() => { animateTo({ duration: 5000, iterations: -1 }, () => { this.imageAngle = 360 }) }) } .height('100%') .width('100%') }
还请试下使用animateTo实现:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-explicit-animation-V5
如: