diff --git a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx index af7dd4acce..5a724e5f6b 100644 --- a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx @@ -152,7 +152,6 @@ const StyledTabs = styled(Tabs)<{ $showHeader?: boolean; $animationStyle: AnimationStyleType; $isDestroyPane?: boolean; - $placement?: string; }>` &.ant-tabs { height: 100%; @@ -167,15 +166,15 @@ const StyledTabs = styled(Tabs)<{ height: 100%; } + /* Keep AntD flex nav so overflow "..." stays on the right. */ .ant-tabs-nav { - display: ${(props) => (props.$showHeader ? "block" : "none")}; + ${(props) => !props.$showHeader && `display: none;`} margin: 0px; } - .ant-tabs-tab + .ant-tabs-tab { - ${(props) => (props.$placement === "left" || props.$placement === "right") - ? `margin: 20px 0 0 0;` - : `margin: 0 0 0 20px;`} + /* tabBarGutter also margins the more button; keep "..." flush like AntD default. */ + .ant-tabs-nav-more { + margin-inline-start: 0 !important; } ${(props) => props.$style && getStyle(props.$style, props.$headerStyle, props.$bodyStyle)} @@ -315,7 +314,6 @@ const TabbedContainer = (props: TabbedContainerProps) => { $bodyStyle={bodyStyle} $showHeader={showHeader} $isDestroyPane={tabBehavior === "destroy"} - $placement={props.placement} onChange={(key) => { if (key !== props.selectedTabKey.value) { props.selectedTabKey.onChange(key); @@ -384,7 +382,10 @@ export const TabbedContainerBaseComp = (function () {
{children.placement.propertyView({ label: trans("tabbedContainer.placement"), radioButton: true })} {children.tabsCentered.propertyView({ label: trans("tabbedContainer.tabsCentered")})} - { children.tabsGutter.propertyView({ label: trans("tabbedContainer.gutter"), tooltip : trans("tabbedContainer.gutterTooltip") })} + {children.tabsGutter.propertyView({ + label: trans("tabbedContainer.gutter"), + tooltip: trans("tabbedContainer.gutterTooltip"), + })} {children.horizontalGridCells.propertyView({ label: trans('prop.horizontalGridCells'), })} diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index ee3b6a47d5..c07aaf75aa 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -3193,7 +3193,7 @@ export const en = { "placement" : "Tabs Placement", "showTabs": "Show Tabs", "gutter" : "Gap", - "gutterTooltip" : "The distance between tabs in px", + "gutterTooltip" : "Gap between tabs in px (Ant Design tabBarGutter). Default is 32.", "tabsCentered" : "Centered Tabs", "destroyInactiveTab": "Destroy Inactive TabPane", "tabBehavior": "Tab Behavior",