[improvement] Tab: update line style (#1908)

This commit is contained in:
neverland 2018-10-09 17:44:53 +08:00 committed by GitHub
parent 8afb40e9af
commit bcfa4ed3ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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 = {

View File

@ -86,6 +86,7 @@ $van-tabs-card-height: 30px;
bottom: 15px;
height: 2px;
position: absolute;
border-radius: 2px 0;
background-color: $red;
}