From 01f8d046c36dc5c034a941b1c92fb1547ffdf607 Mon Sep 17 00:00:00 2001 From: lexiaoyao2 Date: Tue, 19 Aug 2025 20:34:52 +0800 Subject: [PATCH] image content transition Signed-off-by: lexiaoyao2 Change-Id: Ica5a9cf0ceefd832d64a3e54edbaafc84bda7e8d --- api/@internal/component/ets/image.d.ts | 12 +++++++ api/@internal/component/ets/image_common.d.ts | 31 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 72d7e101d4..4ea96b632f 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -2274,6 +2274,18 @@ declare class ImageAttribute extends CommonMethod { * @arkts 1.1&1.2 */ orientation(orientation: ImageRotateOrientation) : ImageAttribute; + + /** + * Animation effect when the image content changes. + * + * @param { ContentTransiton } transition - Animation effect type + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + contentTransition(transition: ContentTransiton): ImageAttribute; } /** diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index 7415991b1a..40c84b8453 100644 --- a/api/@internal/component/ets/image_common.d.ts +++ b/api/@internal/component/ets/image_common.d.ts @@ -143,4 +143,35 @@ declare interface ImageAIOptions { * @arkts 1.1&1.2 */ aiController?: ImageAnalyzerController; +} + +/** + * Defines the animation effect type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ +declare enum ContentTransiton { + /** + * When the content changes, there is no animation effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + IDENTITY = 0, + + /** + * When the content changes, there is a smooth fade-in and fade-out effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + OPACITY = 1, } \ No newline at end of file -- Gitee