Commit 21e43782 by guomingpang

feat:课程管理缺省图替换,导航栏收起高亮

parent 718ee023
@import '../../core/variables.less'; @import '../../core/variables.less';
@top-height: 0px; @top-height: 0px;
@menu-bakg: #FFF; @menu-bakg: #fff;
@active-color: #2966FF; @active-color: #2966ff;
.left-container { .left-container {
position: absolute; position: absolute;
z-index: 2; z-index: 2;
...@@ -24,20 +24,20 @@ ...@@ -24,20 +24,20 @@
margin: 15px 0 15px 8px; margin: 15px 0 15px 8px;
} }
} }
.menu-type-icon{ .menu-type-icon {
margin: 8px 14px 0px 4px; margin: 8px 14px 0px 4px;
cursor: pointer; cursor: pointer;
.icon{ .icon {
font-size:14px; font-size: 14px;
color:#5E606A; color: #5e606a;
} }
} }
} }
.ant-menu { .ant-menu {
padding-left: 0 !important; padding-left: 0 !important;
color: #333; color: #333;
background: #FFF !important; background: #fff !important;
} }
.left { .left {
-webkit-user-select: none; -webkit-user-select: none;
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
display: -webkit-flex; display: -webkit-flex;
flex-direction: column; flex-direction: column;
-webkit-flex-direction: column; -webkit-flex-direction: column;
.nav { .nav {
-webkit-flex: 1; -webkit-flex: 1;
cursor: default; cursor: default;
...@@ -59,78 +59,81 @@ ...@@ -59,78 +59,81 @@
display: none; display: none;
} }
.icon { .icon {
margin-right: 20px margin-right: 20px;
}
.icon-img-box {
// display: flex;
.icon-img {
margin-left: 12px;
}
} }
.icon-img{ .icon-img {
width:18px; width: 18px;
height:18px; height: 18px;
margin-right:6px;
} }
.listType { .listType {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: #9A9DA7; background: #9a9da7;
border-radius: 50%; border-radius: 50%;
top: 18px; top: 18px;
left: 38px; left: 38px;
position: absolute; position: absolute;
} }
.ant-menu-item{ .ant-menu-item {
padding-left: 13px !important; padding-left: 12px !important;
padding-right: 0px; padding-right: 0px;
margin: 6px 8px; margin: 6px 8px;
width: calc(100% - 15px); width: calc(100% - 15px);
&:hover{ &:hover {
background: #F3F6FA; background: #f3f6fa;
border-radius: 2px; border-radius: 2px;
color:#333; color: #333;
} }
} }
.ant-menu-item-selected{ .ant-menu-item-selected {
background-color:@active-color; background-color: @active-color;
color:#FFF; color: #fff;
border-radius:2px; border-radius: 2px;
&:hover{ &:hover {
color:#FFF; color: #fff;
} }
} }
.ant-menu-submenu{ .ant-menu-submenu {
.ant-menu-submenu-title{ .ant-menu-submenu-title {
margin:6px 8px; margin: 6px 8px;
padding-left:13px !important; padding-left: 0 !important;
} }
.ant-menu-item{ .ant-menu-item {
padding-left:46px !important; padding-left: 46px !important;
} }
} }
.ant-menu-submenu-selected{ .ant-menu-submenu-selected {
color:@active-color; color: @active-color;
.ant-menu-item-selected{ .ant-menu-item-selected {
color:#FFF; color: #fff;
.listType { .listType {
background: @active-color; background: @active-color;
} }
} }
} }
.ant-menu-submenu-arrow{ .ant-menu-submenu-arrow {
right:22px; right: 22px;
color:#5E606A; color: #5e606a;
} }
} }
} }
&.left-container-vertical { &.left-container-vertical {
width: 56px; width: 56px;
.menu-type-icon{ .menu-type-icon {
margin:4px 0 0px 22px; margin: 4px 0 0px 22px;
} }
.left { .left {
.ant-menu-submenu-arrow{ .ant-menu-submenu-arrow {
display:none !important; display: none !important;
} }
} }
} }
...@@ -144,35 +147,37 @@ ...@@ -144,35 +147,37 @@
// } // }
} }
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background:@active-color !important; background: @active-color !important;
} }
.ant-menu.ant-menu-dark, .ant-menu-dark .ant-menu-sub, .ant-menu.ant-menu-dark .ant-menu-sub{ .ant-menu.ant-menu-dark,
.ant-menu-dark .ant-menu-sub,
.ant-menu.ant-menu-dark .ant-menu-sub {
background: @menu-bakg !important; background: @menu-bakg !important;
} }
.ant-menu-submenu-popup{ .ant-menu-submenu-popup {
left:67px !important; left: 67px !important;
} }
.ant-menu-submenu-popup>.ant-menu { .ant-menu-submenu-popup > .ant-menu {
background: @menu-bakg !important; background: @menu-bakg !important;
color: #333; color: #333;
width: 132px; width: 132px;
min-width: auto; min-width: auto;
li { li {
width: calc(100% - 16px); width: calc(100% - 16px);
padding-left: 20px; padding-left: 20px;
margin:12px 8px !important; margin: 12px 8px !important;
&:hover{ &:hover {
background: #F3F6FA; background: #f3f6fa;
border-radius: 2px; border-radius: 2px;
color:#333 !important; color: #333 !important;
} }
} }
.ant-menu-item-selected { .ant-menu-item-selected {
background: @active-color; background: @active-color;
color: #fff; color: #fff;
&:hover{ &:hover {
color: #fff !important; color: #fff !important;
} }
} }
......
...@@ -122,8 +122,18 @@ function Aside(props: any) { ...@@ -122,8 +122,18 @@ function Aside(props: any) {
return ( return (
<SubMenu <SubMenu
key={item.groupCode} key={item.groupCode}
style={{ marginTop: 0, backgroundColor: !menuType && item.groupCode === selectKeyParent ? '#2966FF' : '#fff' }} style={{ marginTop: 0 }}
icon={<img src={!menuType && item.groupCode === selectKeyParent ? item.selectImg : item.img} className='icon-img'></img>} icon={
!menuType && item.groupCode === selectKeyParent ? (
<div className='icon-img-box' style={{ backgroundColor: '#2966FF', width: '40px', height: '40px' }}>
<img src={item.selectImg} className='icon-img' />
</div>
) : (
<div className='icon-img-box' style={{ backgroundColor: '#fff', width: '40px', height: '40px', display: 'inline-block' }}>
<img src={item.img} className='icon-img' />
</div>
)
}
title={menuType ? <span>{item.groupName}</span> : ''} title={menuType ? <span>{item.groupName}</span> : ''}
onTitleClick={() => onOpenChange(item.groupCode)}> onTitleClick={() => onOpenChange(item.groupCode)}>
{item.children.map((_item: any, _index: any) => { {item.children.map((_item: any, _index: any) => {
......
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