From f2a683bc9c93696be77d91f9a9fe78cfb7132b4b Mon Sep 17 00:00:00 2001 From: lancer Date: Thu, 11 Sep 2025 10:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=89=8B=E5=8A=BF=E6=BB=91=E5=8A=A8=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=92=8C=E6=83=AF=E6=80=A7=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E7=BB=93=E6=9D=9F=E5=9B=9E=E8=B0=83=20Signed?= =?UTF-8?q?-off-by:=20haoshuo=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@internal/component/ets/common.d.ts | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 6f657358c0..1e77301897 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -34153,6 +34153,19 @@ declare class ScrollableCommonMethod extends CommonMethod { */ onDidScroll(handler: OnScrollCallback): T; + /** + * Called when the scrollable will start dragging. + * + * @param { VoidCallback } handler - callback of start dragging. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 22 + */ + onWillStartDragging(handler: VoidCallback): T; + /** * Called when the scrollable will end dragging. * @@ -34166,6 +34179,45 @@ declare class ScrollableCommonMethod extends CommonMethod { */ onWillStopDragging(handler: OnWillStopDraggingCallback): T; + /** + * Called when the scrollable did end dragging. + * + * @param { OnDidStopDraggingCallback } handler - callback of end dragging. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 22 + */ + onDidStopDragging(handler: OnDidStopDraggingCallback): T; + + /** + * Called when the scrollable will start fling. + * + * @param { VoidCallback } handler - callback of start fling. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 22 + */ + onWillStartFling(handler: VoidCallback): T; + + /** + * Called when the scrollable did end fling. + * + * @param { VoidCallback } handler - callback of end fling. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 22 + */ + onDidStopFling(handler: VoidCallback): T; + /** * Triggered when the scrollable component reaches the start position. * @@ -34373,6 +34425,19 @@ declare type OnItemDragStartCallback = (event: ItemDragInfo, itemIndex: number) */ declare type OnWillStopDraggingCallback = (velocity: number) => void; +/** + * On scroll callback using in scrollable onDidStopDragging. + * + * @typedef { function } OnDidStopDraggingCallback + * @param { boolean } willFling - whether start fling animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 22 + */ +declare type OnDidStopDraggingCallback = (willFling: boolean) => void; + /** * Defines the onMove callback. * -- Gitee