chore(@vant/use): export getScrollParent method

This commit is contained in:
chenjiahan 2020-12-27 21:00:23 +08:00
parent 51cb389ef9
commit 596c111a57

View File

@ -14,7 +14,7 @@ function isElement(node: Element) {
} }
// https://github.com/youzan/vant/issues/3823 // 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; let node = el;
while (node && node !== root && isElement(node)) { while (node && node !== root && isElement(node)) {