[bugfix] Tabs: incorrect line position in some cases (#3961)

This commit is contained in:
neverland
2019-07-25 19:03:16 +08:00
committed by GitHub
parent f52890cfd6
commit 3c2270a5ad
20 changed files with 154 additions and 168 deletions
+3 -6
View File
@@ -1,7 +1,8 @@
import { createNamespace } from '../utils';
import Loading from '../loading';
import { isHidden } from '../utils/dom/style';
import { BindEventMixin } from '../mixins/bind-event';
import { getScrollEventTarget } from '../utils/dom/scroll';
import Loading from '../loading';
const [createComponent, bem, t] = createNamespace('list');
@@ -78,11 +79,7 @@ export default createComponent({
const scrollerHeight = scrollerRect.bottom - scrollerRect.top;
/* istanbul ignore next */
if (
!scrollerHeight ||
window.getComputedStyle(el).display === 'none' ||
el.offsetParent === null
) {
if (!scrollerHeight || isHidden(el)) {
return false;
}