@@ -41,6 +41,7 @@ import pick from 'lodash-es/pick';
41
41
import PropTypes from '../../_util/vue-types' ;
42
42
import type { MouseEventHandler } from '../../_util/EventInterface' ;
43
43
import omit from '../../_util/omit' ;
44
+ import useCSSVarCls from '../../config-provider/hooks/useCssVarCls' ;
44
45
import useStyle from '../style' ;
45
46
export type TabsType = 'line' | 'card' | 'editable-card' ;
46
47
export type TabsPosition = 'top' | 'right' | 'bottom' | 'left' ;
@@ -169,7 +170,8 @@ const InternalTabs = defineComponent({
169
170
'tabs' ,
170
171
props ,
171
172
) ;
172
- const [ wrapSSR , hashId ] = useStyle ( prefixCls ) ;
173
+ const rootCls = useCSSVarCls ( prefixCls ) ;
174
+ const [ wrapSSR , hashId , cssVarCls ] = useStyle ( prefixCls , rootCls ) ;
173
175
const rtl = computed ( ( ) => direction . value === 'rtl' ) ;
174
176
const mergedAnimated = computed < AnimatedConfig > ( ( ) => {
175
177
const { animated, tabPosition } = props ;
@@ -322,6 +324,8 @@ const InternalTabs = defineComponent({
322
324
pre ,
323
325
`${ pre } -${ mergedTabPosition . value } ` ,
324
326
{
327
+ [ cssVarCls . value ] : true ,
328
+ [ rootCls . value ] : true ,
325
329
[ hashId . value ] : true ,
326
330
[ `${ pre } -${ size . value } ` ] : size . value ,
327
331
[ `${ pre } -card` ] : [ 'card' , 'editable-card' ] . includes ( type as string ) ,
0 commit comments