mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [tabs] fix nav height for better display (#15600)
fix(components): [tabs] fix border UI
This commit is contained in:
@@ -369,28 +369,30 @@ const TabNav = defineComponent({
|
||||
>
|
||||
{scrollBtn}
|
||||
<div class={ns.e('nav-scroll')} ref={navScroll$}>
|
||||
<div
|
||||
class={[
|
||||
ns.e('nav'),
|
||||
ns.is(rootTabs.props.tabPosition),
|
||||
ns.is(
|
||||
'stretch',
|
||||
props.stretch &&
|
||||
['top', 'bottom'].includes(rootTabs.props.tabPosition)
|
||||
),
|
||||
]}
|
||||
ref={nav$}
|
||||
style={navStyle.value}
|
||||
role="tablist"
|
||||
onKeydown={changeTab}
|
||||
>
|
||||
{...[
|
||||
!props.type ? (
|
||||
<TabBar ref={tabBarRef} tabs={[...props.panes]} />
|
||||
) : null,
|
||||
tabs,
|
||||
]}
|
||||
</div>
|
||||
{props.panes.length > 0 ? (
|
||||
<div
|
||||
class={[
|
||||
ns.e('nav'),
|
||||
ns.is(rootTabs.props.tabPosition),
|
||||
ns.is(
|
||||
'stretch',
|
||||
props.stretch &&
|
||||
['top', 'bottom'].includes(rootTabs.props.tabPosition)
|
||||
),
|
||||
]}
|
||||
ref={nav$}
|
||||
style={navStyle.value}
|
||||
role="tablist"
|
||||
onKeydown={changeTab}
|
||||
>
|
||||
{...[
|
||||
!props.type ? (
|
||||
<TabBar ref={tabBarRef} tabs={[...props.panes]} />
|
||||
) : null,
|
||||
tabs,
|
||||
]}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
height: getCssVar('tabs', 'header-height');
|
||||
transition: transform getCssVar('transition-duration');
|
||||
float: left;
|
||||
z-index: calc(#{getCssVar('index-normal')} + 1);
|
||||
|
||||
Reference in New Issue
Block a user