mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 08:37:23 +00:00
chore(@vant/use): export getScrollParent method
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user