fix(components): [tabs] fix nav height for better display (#15600)

fix(components): [tabs] fix border UI
This commit is contained in:
maicss
2025-06-16 15:55:11 +08:00
committed by GitHub
parent 2f17df1209
commit af97019b70
2 changed files with 25 additions and 22 deletions

View File

@@ -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>
)

View File

@@ -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);