mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Tab: update line style (#1908)
This commit is contained in:
parent
8afb40e9af
commit
bcfa4ed3ac
@ -256,7 +256,7 @@ export default create({
|
||||
}
|
||||
|
||||
const tab = this.$refs.tabs[this.curActive];
|
||||
const width = this.lineWidth || tab.offsetWidth;
|
||||
const width = this.lineWidth || (tab.offsetWidth / 2);
|
||||
const left = tab.offsetLeft + (tab.offsetWidth - width) / 2;
|
||||
|
||||
this.lineStyle = {
|
||||
|
@ -86,6 +86,7 @@ $van-tabs-card-height: 30px;
|
||||
bottom: 15px;
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
border-radius: 2px 0;
|
||||
background-color: $red;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user