From 453b4218e83e8b8b0ca040a00f6a512f8d991649 Mon Sep 17 00:00:00 2001 From: LittleSound <464388324@qq.com> Date: Tue, 1 Nov 2022 23:34:02 +0800 Subject: [PATCH] fix(useScroll): the expected result cannot be returned after setting the throttle parameter. --- packages/core/useScroll/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/useScroll/index.ts b/packages/core/useScroll/index.ts index 88ddc72f3c5..ca212dc024a 100644 --- a/packages/core/useScroll/index.ts +++ b/packages/core/useScroll/index.ts @@ -189,7 +189,7 @@ export function useScroll( useEventListener( element, 'scroll', - throttle ? useThrottleFn(onScrollHandler, throttle) : onScrollHandler, + throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions, )