ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

🧐[问题]切换主题后,多选卡片主题色未生效 #8633

Open freesaber opened 2 months ago

freesaber commented 2 months ago

image

图中,其他位置颜色已经切换了。多选卡片好像存在样式,但是是被覆盖的。下面是app的样式切换

import { RouterProvider } from 'react-router-dom'
import { ConfigProvider, App, theme } from 'antd'
import router from './router'
import AntdGlobal from './utils/AntdGlobal';
import { useUserStore } from '@/store/useUserStore';

export default () => {
  const isDark = useUserStore(state => state.isDark)
  return (
    <ConfigProvider
      theme={{
        algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm,
      }}
    >
      <App>
        <AntdGlobal />
        <RouterProvider router={router}></RouterProvider>
      </App>
    </ConfigProvider>
  )
}

页面需要刷新,主题色样式才能生效 image