diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 72d7e101d419e1c84c4e98f1470e74b7635b133e..bac573f16a1fe24bab518fdee2768d4a05ab0bdb 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 21 + */ + 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 7415991b1a970aabdba46f343a33f201a59f309c..9fce7e0d3421b6ad2fcafd8ff62942eca3306f14 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 21 + */ +declare enum ContentTransiton { + /** + * When the content changes, there is no animation effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + IDENTITY = 0, + + /** + * When the content changes, there is a smooth fade-in and fade-out effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + OPACITY = 1, } \ No newline at end of file