Skip to content

Commit 5f6bec1

Browse files
committed
Tabs: fix tabs style
1 parent 2b9be3c commit 5f6bec1

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

packages/tabs/src/tab-nav.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
{scrollBtn}
250250
<div class={['el-tabs__nav-scroll']} ref="navScroll">
251251
<div
252-
class={['el-tabs__nav', stretch && ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'is-stretch' : '']}
252+
class={['el-tabs__nav', `is-${ this.rootTabs.tabPosition }`, stretch && ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'is-stretch' : '']}
253253
ref="nav"
254254
style={navStyle}
255255
role="tablist"
@@ -278,4 +278,3 @@
278278
}
279279
};
280280
</script>
281-

packages/theme-chalk/src/tabs.scss

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,27 @@
307307
.el-tabs__nav-wrap.is-right {
308308
margin-bottom: 0;
309309

310+
> .el-tabs__nav-prev,
311+
> .el-tabs__nav-next {
312+
height: 30px;
313+
line-height: 30px;
314+
width: 100%;
315+
text-align: center;
316+
cursor: pointer;
317+
318+
i {
319+
transform: rotateZ(90deg);
320+
}
321+
}
322+
> .el-tabs__nav-prev {
323+
left: auto;
324+
top: 0;
325+
}
326+
> .el-tabs__nav-next {
327+
right: auto;
328+
bottom: 0;
329+
}
330+
310331
&.is-scrollable {
311332
padding: 30px 0;
312333
}
@@ -319,34 +340,14 @@
319340
}
320341
}
321342

322-
.el-tabs__nav {
343+
.el-tabs__nav.is-left,
344+
.el-tabs__nav.is-right {
323345
float: none;
324346
}
325347
.el-tabs__item.is-left,
326348
.el-tabs__item.is-right {
327349
display: block;
328350
}
329-
330-
.el-tabs__nav-prev,
331-
.el-tabs__nav-next {
332-
height: 30px;
333-
line-height: 30px;
334-
width: 100%;
335-
text-align: center;
336-
cursor: pointer;
337-
338-
i {
339-
transform: rotateZ(90deg);
340-
}
341-
}
342-
.el-tabs__nav-prev {
343-
left: auto;
344-
top: 0;
345-
}
346-
.el-tabs__nav-next {
347-
right: auto;
348-
bottom: 0;
349-
}
350351
}
351352
@include m(left) {
352353
.el-tabs__header.is-left {

0 commit comments

Comments
 (0)