diff --git a/packages/vant-use/src/useScrollParent/index.ts b/packages/vant-use/src/useScrollParent/index.ts index 0b5b81ef8..5968f2df5 100644 --- a/packages/vant-use/src/useScrollParent/index.ts +++ b/packages/vant-use/src/useScrollParent/index.ts @@ -14,7 +14,7 @@ function isElement(node: Element) { } // https://github.com/youzan/vant/issues/3823 -function getScrollParent(el: Element, root: ScrollElement = window) { +export function getScrollParent(el: Element, root: ScrollElement = window) { let node = el; while (node && node !== root && isElement(node)) {