Skip to content

Commit

Permalink
fix(Provider):修复dark黑色主题无效的问题 (#9030)
Browse files Browse the repository at this point in the history
黑色主题变量被覆盖,需要反过来
  • Loading branch information
echoyl authored Feb 27, 2025
1 parent ff3cfc5 commit e37d3b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/provider/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ export const ProConfigProvider: React.FC<{
const mergeAlgorithm = () => {
const isDark = dark ?? proProvide.dark;
if (isDark && !Array.isArray(theme?.algorithm)) {
return [proTheme.darkAlgorithm, theme?.algorithm].filter(Boolean);
return [theme?.algorithm, proTheme.darkAlgorithm].filter(Boolean);
}
if (isDark && Array.isArray(theme?.algorithm)) {
return [proTheme.darkAlgorithm, ...(theme?.algorithm || [])].filter(
return [...(theme?.algorithm || []), proTheme.darkAlgorithm].filter(
Boolean,
);
}
Expand Down

0 comments on commit e37d3b5

Please sign in to comment.