#星计划# 鸿蒙 HarmonyOS ArkTS ArkUI 动画 向右滑动、向左滑动、向下滑动
原创
EntryComponentstructIndex{StateAx:number0StateAxx:number260StateAy:number290onPageShow():void{animateTo({duration:2000,iterations:1,curve:Curve.Linear,playMode:PlayMode.Alternate},(){this.Ax260this.Axx0this.Ay600})}build(){Column(){向右滑动Column(){}.width(100).height(100).backgroundColor('ffc44f4f').position({x:this.Ax,y:0})Text('向右滑动').fontSize(20).fontWeight(FontWeight.Bold).margin({bott...