Tabs: fix right padding of last tab item in basic type top/bottom position

This commit is contained in:
刘盼峰 2017-12-08 09:22:30 +08:00 committed by 杨奕
parent ffc310d98d
commit 0c824d61c8
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@
} else {
tabSize = $el[`client${firstUpperCase(sizeName)}`];
if (sizeName === 'width') {
tabSize -= index === 0 ? 20 : 40;
tabSize -= (index === 0 || index === this.tabs.length - 1) ? 20 : 40;
}
return false;
}

View File

@ -228,12 +228,18 @@
.el-tabs__item:nth-child(2) {
padding-left: 0;
}
.el-tabs__item:last-child {
padding-right: 0;
}
&.el-tabs--border-card, &.el-tabs--card,
.el-tabs--left, .el-tabs--right {
.el-tabs__item:nth-child(2) {
padding-left: 20px;
}
.el-tabs__item:last-child {
padding-right: 20px;
}
}
}
@include m(bottom) {