File tree 1 file changed +5
-4
lines changed
components/config-provider
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ import {
27
27
import { useProviderSize } from './SizeContext' ;
28
28
import { useProviderDisabled } from './DisabledContext' ;
29
29
import { createTheme } from '../_util/cssinjs' ;
30
- import { useDesignTokenProvider } from '../theme/internal' ;
31
- import { toReactive } from '../_util/toReactive' ;
30
+ import { DesignTokenProvider } from '../theme/internal' ;
32
31
33
32
export type {
34
33
ConfigProviderProps ,
@@ -235,7 +234,6 @@ const ConfigProvider = defineComponent({
235
234
} ,
236
235
} ;
237
236
} ) ;
238
- useDesignTokenProvider ( toReactive ( memoTheme ) ) ;
239
237
const validateMessagesRef = computed ( ( ) => {
240
238
// Additional Form provider
241
239
let validateMessages : ValidateMessages = { } ;
@@ -257,9 +255,12 @@ const ConfigProvider = defineComponent({
257
255
useProviderDisabled ( componentDisabled ) ;
258
256
259
257
const renderProvider = ( legacyLocale : Locale ) => {
258
+ let childNode = shouldWrapSSR . value ? wrapSSR ( slots . default ?.( ) ) : slots . default ?.( ) ;
259
+ if ( props . theme )
260
+ childNode = < DesignTokenProvider value = { memoTheme . value } > { childNode } </ DesignTokenProvider > ;
260
261
return (
261
262
< LocaleProvider locale = { locale . value || legacyLocale } ANT_MARK__ = { ANT_MARK } >
262
- { shouldWrapSSR . value ? wrapSSR ( slots . default ?. ( ) ) : slots . default ?. ( ) }
263
+ { childNode }
263
264
</ LocaleProvider >
264
265
) ;
265
266
} ;
You can’t perform that action at this time.
0 commit comments