Commit ba152088 by guomingpang

fix:选中菜单高亮bug修复

parent 37f7083a
......@@ -64,10 +64,15 @@
.icon-img-box {
// display: flex;
display: inline-block;
width: 40px;
height: 40px;
.icon-img {
margin-left: 12px;
}
margin-right: 0 !important;
}
.icon-img-title {
margin-left: 0 !important;
}
.icon-img {
width: 18px;
......
......@@ -134,7 +134,7 @@ function Aside(props: any) {
</div>
)
}
title={menuType ? <span>{item.groupName}</span> : ''}
title={menuType ? <span className='icon-img-title'>{item.groupName}</span> : ''}
onTitleClick={() => onOpenChange(item.groupCode)}>
{item.children.map((_item: any, _index: any) => {
if (ctx.xmState.storeUserPermissionList.indexOf(_item.groupCode) === -1) {
......@@ -162,16 +162,16 @@ function Aside(props: any) {
key={item.groupCode}
icon={
!menuType && item.groupCode === selectKeyParent ? (
<div className='icon-img-box' style={{ backgroundColor: '#2966FF', width: '40px' }}>
<div className='icon-img-box' style={{ backgroundColor: '#2966FF' }}>
<img src={item.selectImg} className='icon-img' />
</div>
) : (
<div className='icon-img-box' style={{ width: '30px' }}>
<div className='icon-img-box'>
<img src={selectKey === item.groupCode ? item.selectImg : item.img} className='icon-img' />
</div>
)
}>
{menuType ? item.groupName : ''}
{menuType ? <span className='icon-img-title'>{item.groupName}</span> : ''}
</Menu.Item>
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment