mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(@vant/use): export getScrollParent method
This commit is contained in:
parent
51cb389ef9
commit
596c111a57
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user