animateController: AnimatorResult = Animator.create({
    duration: 800,
    easing: "linear",
    delay: 0,
    fill: 'backwards',
    direction: 'normal',
    iterations: 1,
    begin: 0,
    end: 360,
  })

        this.animateController.onFrame = (val) => {
          this.dataSource.getData(groupIndex)
            .childdataSource
            .getData(itemIndex)
            .poleft = val
          this.dataSource.getData(groupIndex).childdataSource.notifyDataChange(itemIndex)
        }

        this.animateController.onfinish = () => {
          this.dataSource.getData(groupIndex).childdataSource.deleteData(itemIndex)
        }

        this.animateController.play()
.opacity(1-it.poleft!*1/360)
.offset({ left: it.poleft })

Logo

讨论HarmonyOS开发技术,专注于API与组件、DevEco Studio、测试、元服务和应用上架分发等。

更多推荐