mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[improvement] Tab: update line style (#719)
This commit is contained in:
parent
18befcb15d
commit
61a9031867
@ -70,6 +70,7 @@
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
background-color: @red;
|
||||
border-radius: 2px 0 2px 0;
|
||||
}
|
||||
|
||||
&--line {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user