diff --git a/packages/tabs/index.less b/packages/tabs/index.less index b6bbae96..da435dbc 100644 --- a/packages/tabs/index.less +++ b/packages/tabs/index.less @@ -70,6 +70,7 @@ height: 2px; position: absolute; background-color: @red; + border-radius: 2px 0 2px 0; } &--line { diff --git a/packages/tabs/index.ts b/packages/tabs/index.ts index 5ca768d5..ad0ea848 100644 --- a/packages/tabs/index.ts +++ b/packages/tabs/index.ts @@ -120,7 +120,7 @@ VantComponent({ this.getRect('.van-tab', true).then(rects => { const rect = rects[this.data.active]; - const width = this.data.lineWidth || rect.width; + const width = this.data.lineWidth || (rect.width / 2); let left = rects .slice(0, this.data.active) .reduce((prev, curr) => prev + curr.width, 0);