diff --git a/components/tabs/Tabs.tsx b/components/tabs/Tabs.tsx index b482453c6..03120ef85 100644 --- a/components/tabs/Tabs.tsx +++ b/components/tabs/Tabs.tsx @@ -97,8 +97,11 @@ export default class Tabs extends PureComponent { renderTabs = (tab: ReactElement, index: number) => { const { prefixCls, disabled } = this.props; + const { value } = this.state; + const itemCls = classnames(`${prefixCls}__tab`, tab.props.className, { [`${prefixCls}__tab--disabled`]: disabled || tab.props.disabled, + [`${prefixCls}__tab--active`]: value === index, }); const isScroll = this.isScroll(); const itemSize = this.calculateItemWidth(); @@ -215,9 +218,8 @@ export default class Tabs extends PureComponent { lineInnerRender = ; } - const headerCls = classnames({ + const headerCls = classnames(`${prefixCls}__header`, { [`${prefixCls}__scroll`]: ChildCount > scrollThreshold!, - [`${prefixCls}__header`]: true, }); return (