feat(Tab): add scrollspy prop (#5273)

This commit is contained in:
健忘症患者丶
2019-12-16 20:17:09 +08:00
committed by neverland
parent 9cd06f3b20
commit 4603e1633c
12 changed files with 266 additions and 10 deletions
+4
View File
@@ -59,3 +59,7 @@ export function getVisibleHeight(element: ScrollElement) {
? element.innerHeight
: (<HTMLElement>element).getBoundingClientRect().height;
}
export function getVisibleTop(element: ScrollElement) {
return element === window ? 0 : (<HTMLElement>element).getBoundingClientRect().top;
}