Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当某个page中含有<Menu />时,会把本身左侧的Menu样式也给修改了 #11394

Open
gitcsw opened this issue Nov 22, 2024 · 1 comment

Comments

@gitcsw
Copy link

gitcsw commented Nov 22, 2024

当某个page中有

<Menu
           ...
 />

代码时,会把左侧原先Menu的样式给重制成默认的。
这是正常情况:
image
打开含有

的某个page,则:
image

但官方给的演示中没有这个情况,我是基于simple模版进行开发的,也比对了很多配置文件,没有找出问题所在。

@gitcsw
Copy link
Author

gitcsw commented Nov 23, 2024

经过多次测试,发现
image

<ConfigProvider
        theme={{
          components: {
            Menu: {
              itemSelectedBg: '#e6f4ff', // 不知道什么原因,反正设置一下就不影响左侧menu样式了
            },
          },
        }}
      >
<Menu
             ...
            />
 </ConfigProvider>

使用ConfigProvider包裹并且设置一下menu的itemSelectedBg颜色后,就不影响原先侧边Sider Menu的样式了。。。不清楚具体的bug在哪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant