From c661ad8a008455b3da14e82c9fe5a06dd7e5f133 Mon Sep 17 00:00:00 2001 From: xi-heqiong Date: Sat, 6 Sep 2025 16:34:43 +0800 Subject: [PATCH] 0906_fixAnimation Signed-off-by: xi-heqiong Change-Id: Ia5390bad8674f86f473c176a7df9e55426258b12 --- .../arkui/generated/component/common.ets | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/generated/component/common.ets b/frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/generated/component/common.ets index 9f71392d82e..0f4e274f626 100644 --- a/frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/generated/component/common.ets +++ b/frameworks/bridge/arkts_frontend/koala_mirror/arkoala-arkts/arkui/generated/component/common.ets @@ -54,6 +54,7 @@ import { ButtonType, ButtonStyleMode, ButtonRole } from "./button" import { default as uiObserver } from "./../framework/ohos.arkui.observer" import { default as promptAction } from "./../framework/ohos.promptAction" import { ScrollState } from "./list" +import { _animateTo, _animationStart, _animationStop } from "./../handwritten/ArkAnimation" import { Want, Want_serializer } from "./../framework/ohos.app.ability.Want" import { default as intl } from "./../framework/ohos.intl" import { NodeAttach, remember } from "@koalaui/runtime" @@ -7485,8 +7486,11 @@ export interface CommonMethod { focusBox(value: FocusBoxStyle | undefined): this { throw new Error("Unimplemented method focusBox") } - animation(value: AnimateParam | undefined): this { - throw new Error("Unimplemented method animation") + animationStart(value: AnimateParam | undefined): this { + throw new Error("Unimplemented method animationStart") + } + animationStop(value: AnimateParam | undefined): this { + throw new Error("Unimplemented method animationStop") } transition(value: TransitionEffect | undefined): this { throw new Error("Unimplemented method transition") @@ -8248,7 +8252,10 @@ export class ArkCommonMethodStyle implements CommonMethod { public focusBox(value: FocusBoxStyle | undefined): this { return this } - public animation(value: AnimateParam | undefined): this { + public animationStart(value: AnimateParam | undefined): this { + return this + } + public animationStop(value: AnimateParam | undefined): this { return this } public transition(value: TransitionEffect | undefined): this { @@ -9513,10 +9520,19 @@ export class ArkCommonMethodComponent extends ComponentBase implements CommonMet } return this } - public animation(value: AnimateParam | undefined): this { - if (this.checkPriority("animation")) { + public animationStart(value: AnimateParam | undefined): this { + if (this.checkPriority("animationStart")) { const value_casted = value as (AnimateParam | undefined) - this.getPeer()?.setAnimationAttribute(value_casted) + _animationStart(value_casted, this.isFirstBuild); + return this + } + return this + } + public animationStop(value: AnimateParam | undefined): this { + if (this.checkPriority("animationStop")) { + _animationStop(value, this.isFirstBuild, () => { + this.isFirstBuild = false + }); return this } return this -- Gitee