feat(eslint-config): extends typescript-eslint recommended (#6076)

This commit is contained in:
neverland
2020-04-17 14:51:55 +08:00
committed by GitHub
parent 28bbef6b6f
commit 31674a162c
10 changed files with 81 additions and 76 deletions
+4 -4
View File
@@ -19,21 +19,21 @@ export function getScroller(el: HTMLElement, root: ScrollElement = window) {
) {
const { overflowY } = window.getComputedStyle(node);
if (overflowScrollReg.test(<string>overflowY)) {
if (overflowScrollReg.test(overflowY)) {
if (node.tagName !== 'BODY') {
return node;
}
// see: https://github.com/youzan/vant/issues/3823
const { overflowY: htmlOverflowY } = window.getComputedStyle(
<Element>node.parentNode
node.parentNode as Element
);
if (overflowScrollReg.test(<string>htmlOverflowY)) {
if (overflowScrollReg.test(htmlOverflowY)) {
return node;
}
}
node = <HTMLElement>node.parentNode;
node = node.parentNode as HTMLElement;
}
return root;