pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

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

Open hastings0714 opened this issue 1 year ago • 6 comments

🐛 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

💻 复现代码

© 版本信息

  • ProComponents 版本: @ant-design/pro-components": "^2.6.46"
  • umi 版本 "@umijs/max": "^4.0.52"
  • 浏览器环境 edge 最新版
  • 开发环境 [e.g. mac OS]

🚑 其他信息

hastings0714 avatar Jan 16 '24 09:01 hastings0714

遇到了相同的问题 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

siadou avatar Jan 31 '24 06:01 siadou

I have the same problem. image image

ordomalleus avatar Mar 08 '24 10:03 ordomalleus

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

muchengdong avatar Mar 11 '24 05:03 muchengdong

一样的问题

wangsanshao avatar Mar 22 '24 03:03 wangsanshao

用overrides.less覆盖吧

.ant-menu-submenu-popup.ant-menu-submenu {
  background: rgb(39,47,68);
  .ant-menu {
    background: transparent;
  }
}

jiayechao avatar May 17 '24 07:05 jiayechao