diff --git a/packages/tabs/src/tab-bar.vue b/packages/tabs/src/tab-bar.vue index 3b4c354c..ba7eba74 100644 --- a/packages/tabs/src/tab-bar.vue +++ b/packages/tabs/src/tab-bar.vue @@ -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; } diff --git a/packages/theme-chalk/src/tabs.scss b/packages/theme-chalk/src/tabs.scss index b60de5e5..f8bd9d35 100644 --- a/packages/theme-chalk/src/tabs.scss +++ b/packages/theme-chalk/src/tabs.scss @@ -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) {