diff --git a/packages/react/src/panels/CompositePanel.tsx b/packages/react/src/panels/CompositePanel.tsx index a01aaf951..740b15900 100644 --- a/packages/react/src/panels/CompositePanel.tsx +++ b/packages/react/src/panels/CompositePanel.tsx @@ -153,7 +153,7 @@ export const CompositePanel: React.FC & { href={item.href} onClick={(e: any) => { if (shape === 'tab') { - if (index === activeKey) { + if (activeKey === index || activeKey === item.key) { setVisible(!visible) } else { setVisible(true) diff --git a/packages/react/src/panels/styles.less b/packages/react/src/panels/styles.less index 1f7883cf3..dc92c06e9 100644 --- a/packages/react/src/panels/styles.less +++ b/packages/react/src/panels/styles.less @@ -182,7 +182,7 @@ .@{prefix-cls}-composite-panel-tabs-pane.active:after { left: auto; - right: 0px; + right: -1px; } .@{prefix-cls}-composite-panel-tabs-content.pinning {