fix: not use prefixCls with custom theme #6063

pull/6067/head
tangjinzhou 2022-10-30 15:05:36 +08:00
parent 4cdda535a6
commit 213c3a4059
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
};