[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
+2 -1
View File
@@ -1,5 +1,6 @@
import { createNamespace, isDef, addUnit } from '../utils';
import { scrollLeftTo } from './utils';
import { isHidden } from '../utils/dom/style';
import { ParentMixin } from '../mixins/relation';
import { BindEventMixin } from '../mixins/bind-event';
import { setRootScrollTop, getElementTop } from '../utils/dom/scroll';
@@ -149,7 +150,7 @@ export default createComponent({
this.$nextTick(() => {
const { titles } = this.$refs;
if (!titles || !titles[this.currentIndex] || this.type !== 'line') {
if (!titles || !titles[this.currentIndex] || this.type !== 'line' || isHidden(this.$el)) {
return;
}