diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 640cfb35d4ec09fab801d601b980cc956a8afb0e..8079b2f95fc78801172b8f35750ee9f5497bbbb7 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -580,6 +580,36 @@ declare enum ScrollSnapAlign { END = 3, } +/** + * Declare the speed scroll snap animation. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts 22 + */ +declare enum ScrollSnapAnimationSpeed { + /** + * The speed of scroll snap animation is normal. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + NORMAL = 0, + + /** + * The speed of scroll snap animation slow. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + SLOW = 1, +} /** * Defines the chain animation options. * @@ -2045,6 +2075,19 @@ declare class ListAttribute extends ScrollableCommonMethod { */ scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; + /** + * Sets the speed of scroll snap animation. + * + * @param { ScrollSnapAnimationSpeed } speed - Speed of scroll snap animation. + *
Default value: ScrollSnapAnimationSpeed.NORMAL + * @returns { ListAttribute } the attribute of the list. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + scrollSnapAnimationSpeed(speed: ScrollSnapAnimationSpeed): ListAttribute; + /** * Called to setting the nested scroll options. *