From 500025b1bf5db6c9a484740ad4c638d95315932c Mon Sep 17 00:00:00 2001 From: iiijarvis Date: Sat, 22 Jun 2019 15:59:54 +0800 Subject: [PATCH] =?UTF-8?q?fixed:loadmore=20=E7=9B=AE=E6=A0=87=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8dom=E5=85=83=E7=B4=A0=E4=B8=8D=E4=B8=80=E5=AE=9A?= =?UTF-8?q?=E9=9C=80=E8=A6=81overflowY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/loadmore/src/loadmore.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/loadmore/src/loadmore.vue b/packages/loadmore/src/loadmore.vue index 431b7318..d20fefc2 100644 --- a/packages/loadmore/src/loadmore.vue +++ b/packages/loadmore/src/loadmore.vue @@ -204,14 +204,10 @@ getScrollEventTarget(element) { let currentNode = element; - while (currentNode && currentNode.tagName !== 'HTML' && + if (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1) { - let overflowY = document.defaultView.getComputedStyle(currentNode).overflowY; - if (overflowY === 'scroll' || overflowY === 'auto') { return currentNode; } - currentNode = currentNode.parentNode; - } return window; },