mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2025-03-19 18:20:23 +08:00
refactor(arco/Tabs): remove placehoder
In some cases, tabs may not always have slots, so there is no need for placeholders here
This commit is contained in:
parent
da5d342ef6
commit
d6aba768a3
@ -6,7 +6,6 @@ import { FALLBACK_METADATA, getComponentProps } from '../sunmao-helper';
|
||||
import { TabsPropsSpec as BaseTabsPropsSpec } from '../generated/types/Tabs';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { useStateValue } from '../hooks/useStateValue';
|
||||
import { EmptyPlaceholder } from './_internal/EmptyPlaceholder';
|
||||
|
||||
const TabsPropsSpec = Type.Object(BaseTabsPropsSpec);
|
||||
const TabsStateSpec = Type.Object({
|
||||
@ -127,11 +126,7 @@ export const Tabs = implementRuntimeComponent({
|
||||
key={String(idx)}
|
||||
title={tabItem.title}
|
||||
>
|
||||
{slotsElements?.content?.(
|
||||
{ tabIndex: idx },
|
||||
<EmptyPlaceholder />,
|
||||
`content_${idx}`
|
||||
) || <EmptyPlaceholder />}
|
||||
{slotsElements?.content?.({ tabIndex: idx }, undefined, `content_${idx}`)}
|
||||
</TabPane>
|
||||
)
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user