ant-design / pro-components

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

🐛[BUG] 混合模式下,colorBgMenuItemCollapsedElevated设置不生效 #8095

Open hastings0714 opened 9 months ago

hastings0714 commented 9 months ago

🐛 bug 描述

image

混合模式下更改侧边栏背景色,当侧边栏收起后,鼠标滑过的浮层2级菜单背景色没有更改成功,仍然是白色。 colorBgMenuItemCollapsedElevated配置没有生效。

📷 复现步骤

sider配置

 sider: {
      colorMenuBackground: '#001529',
      colorBgMenuItemCollapsedElevated: '#001529',
      colorBgMenuItemActive: '#001529',
      colorTextMenuTitle: '#fff',
      colorTextMenu: '#fff',
      // colorTextMenuSecondary: '#fff',
      colorTextMenuActive: '#fff',
      colorTextMenuSelected: '#fff',
      colorTextMenuItemHover: '#fff',
      colorBgMenuItemHover: LIGHT_BLUE,
      colorBgMenuItemSelected: LIGHT_BLUE,
    }

🏞 期望结果

image

💻 复现代码

© 版本信息

🚑 其他信息

siadou commented 9 months ago

遇到了相同的问题 https://github.com/ant-design/pro-components/blob/master/packages/layout/src/ProLayout.tsx 里面没有 colorBgMenuItemCollapsedElevated 的引用,去年1月份之前在sidermenu里头还有 https://github.com/ant-design/pro-components/blob/6aa0d2ceb77dc55aad17babd447716eb3db94652/packages/layout/src/components/SiderMenu/SiderMenu.tsx

ordomalleus commented 8 months ago

I have the same problem. image image

dfz2 commented 8 months ago

这玩意支持渐变(linear-gradient)吗

wangsanshao commented 7 months ago

一样的问题

jiayechao commented 5 months ago

用overrides.less覆盖吧

.ant-menu-submenu-popup.ant-menu-submenu {
  background: rgb(39,47,68);
  .ant-menu {
    background: transparent;
  }
}
imamaad commented 1 month ago

I have the same problem