Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/tabs/src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import pick from 'lodash-es/pick';
import PropTypes from '../../_util/vue-types';
import type { MouseEventHandler } from '../../_util/EventInterface';
import omit from '../../_util/omit';
import useCSSVarCls from '../../config-provider/hooks/useCssVarCls';
import useStyle from '../style';
export type TabsType = 'line' | 'card' | 'editable-card';
export type TabsPosition = 'top' | 'right' | 'bottom' | 'left';
Expand Down Expand Up @@ -169,7 +170,8 @@ const InternalTabs = defineComponent({
'tabs',
props,
);
const [wrapSSR, hashId] = useStyle(prefixCls);
const rootCls = useCSSVarCls(prefixCls);
const [wrapSSR, hashId, cssVarCls] = useStyle(prefixCls, rootCls);
const rtl = computed(() => direction.value === 'rtl');
const mergedAnimated = computed<AnimatedConfig>(() => {
const { animated, tabPosition } = props;
Expand Down Expand Up @@ -322,6 +324,8 @@ const InternalTabs = defineComponent({
pre,
`${pre}-${mergedTabPosition.value}`,
{
[cssVarCls.value]: true,
[rootCls.value]: true,
[hashId.value]: true,
[`${pre}-${size.value}`]: size.value,
[`${pre}-card`]: ['card', 'editable-card'].includes(type as string),
Expand Down
Loading