mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(tab): correct line position in complete mode (#3777)
* fix(tab): correct line position in complete mode fix #3767, fix #3579 * refactor(tabs): remote console.log
This commit is contained in:
parent
e42169ac51
commit
f1ea060b25
@ -225,7 +225,7 @@ VantComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
const { currentIndex } = this.data;
|
||||
const { currentIndex, ellipsis } = this.data;
|
||||
|
||||
Promise.all([
|
||||
getAllRect.call(this, '.van-tab'),
|
||||
@ -241,7 +241,8 @@ VantComponent({
|
||||
.slice(0, currentIndex)
|
||||
.reduce((prev, curr) => prev + curr.width, 0);
|
||||
|
||||
lineOffsetLeft += (rect.width - lineRect.width) / 2;
|
||||
lineOffsetLeft +=
|
||||
(rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
|
||||
|
||||
this.setData({
|
||||
lineOffsetLeft,
|
||||
|
Loading…
x
Reference in New Issue
Block a user