提交 d494510d 编写于 作者: T theniceangel

feat(tab-bar): caculate tab's offsetLeft by el.offsetLeft

上级 375ca743
......@@ -131,11 +131,7 @@
}
},
_getOffsetLeft (index) {
let offsetLeft = 0
this.tabs.forEach((tab, i) => {
if (i < index) offsetLeft += tab.$el.clientWidth
})
return offsetLeft
return this.tabs[index].$el.offsetLeft || 0
},
_resizeHandler () {
clearTimeout(this._resizeTimer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册