From 1396feb416d8eafc60fc24875b6f03c864e6dcdc Mon Sep 17 00:00:00 2001 From: yeyinglong_admin Date: Wed, 20 Aug 2025 21:11:59 +0800 Subject: [PATCH] =?UTF-8?q?List=E9=99=90=E4=BD=8D=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yeyinglong_admin --- api/@internal/component/ets/list.d.ts | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 640cfb35d4..8079b2f95f 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. * -- Gitee