diff --git a/components/config-provider/index.tsx b/components/config-provider/index.tsx index 82c3cef24..cfd67e220 100644 --- a/components/config-provider/index.tsx +++ b/components/config-provider/index.tsx @@ -72,9 +72,10 @@ const setGlobalConfig = (params: GlobalConfigProviderProps & { theme?: Theme }) } stopWatchEffect = watchEffect(() => { Object.assign(globalConfigBySet, reactive(params)); + Object.assign(globalConfigForApi, reactive(params)); }); if (params.theme) { - registerTheme(params.prefixCls ?? getGlobalPrefixCls(), params.theme); + registerTheme(getGlobalPrefixCls(), params.theme); } };