From 3eb09c9e4ab15faaa4da1211c9c33efd0989d7fe Mon Sep 17 00:00:00 2001 From: zhanghang Date: Wed, 10 Sep 2025 11:22:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:list=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=99=90=E4=BD=8D=E5=8A=A8=E7=94=BB=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang Change-Id: Icd1358061b1913feb85e2569b38ee25696f9972a --- api/@internal/component/ets/list.d.ts | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 2020fab817..0a9d55e940 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -1200,6 +1200,35 @@ interface ListOptions { scroller?: Scroller; } +/** + * Declare the speed scroll snap animation. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 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, +} /** * The list interface is extended. * @@ -2211,6 +2240,19 @@ declare class ListAttribute extends ScrollableCommonMethod { */ syncLoad(enable: boolean): 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 when the offset and status callback of the slide are set. * -- Gitee