Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
21e43782
Commit
21e43782
authored
Jun 29, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:课程管理缺省图替换,导航栏收起高亮
parent
718ee023
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
55 deletions
+70
-55
src/modules/root/Menu.less
+58
-53
src/modules/root/Menu.tsx
+12
-2
No files found.
src/modules/root/Menu.less
View file @
21e43782
@import '../../core/variables.less';
@top-height: 0px;
@menu-bakg: #
FFF
;
@active-color: #2966
FF
;
@menu-bakg: #
fff
;
@active-color: #2966
ff
;
.left-container {
position: absolute;
z-index: 2;
...
...
@@ -24,12 +24,12 @@
margin: 15px 0 15px 8px;
}
}
.menu-type-icon{
.menu-type-icon
{
margin: 8px 14px 0px 4px;
cursor: pointer;
.icon{
font-size:14px;
color:
#5E606A
;
.icon
{
font-size:
14px;
color:
#5e606a
;
}
}
}
...
...
@@ -37,7 +37,7 @@
.ant-menu {
padding-left: 0 !important;
color: #333;
background: #
FFF
!important;
background: #
fff
!important;
}
.left {
-webkit-user-select: none;
...
...
@@ -59,78 +59,81 @@
display: none;
}
.icon {
margin-right: 20px
margin-right: 20px;
}
.icon-img-box {
// display: flex;
.icon-img {
margin-left: 12px;
}
}
.icon-img{
width:18px;
height:18px;
margin-right:6px;
.icon-img {
width: 18px;
height: 18px;
}
.listType {
width: 5px;
height: 5px;
background: #9
A9DA
7;
background: #9
a9da
7;
border-radius: 50%;
top: 18px;
left: 38px;
position: absolute;
}
.ant-menu-item{
padding-left: 1
3
px !important;
.ant-menu-item
{
padding-left: 1
2
px !important;
padding-right: 0px;
margin: 6px 8px;
width: calc(100% - 15px);
&:hover{
background: #
F3F6FA
;
&:hover
{
background: #
f3f6fa
;
border-radius: 2px;
color:#333;
color:
#333;
}
}
.ant-menu-item-selected{
background-color:@active-color;
color:
#FFF
;
border-radius:2px;
&:hover{
color:
#FFF
;
.ant-menu-item-selected
{
background-color:
@active-color;
color:
#fff
;
border-radius:
2px;
&:hover
{
color:
#fff
;
}
}
.ant-menu-submenu{
.ant-menu-submenu-title{
margin:6px 8px;
padding-left:
13px
!important;
.ant-menu-submenu
{
.ant-menu-submenu-title
{
margin:
6px 8px;
padding-left:
0
!important;
}
.ant-menu-item{
padding-left:46px !important;
.ant-menu-item
{
padding-left:
46px !important;
}
}
.ant-menu-submenu-selected{
color:@active-color;
.ant-menu-submenu-selected
{
color:
@active-color;
.ant-menu-item-selected{
color:
#FFF
;
.ant-menu-item-selected
{
color:
#fff
;
.listType {
background: @active-color;
}
}
}
.ant-menu-submenu-arrow{
right:22px;
color:
#5E606A
;
.ant-menu-submenu-arrow
{
right:
22px;
color:
#5e606a
;
}
}
}
&.left-container-vertical {
width: 56px;
.menu-type-icon{
margin:4px 0 0px 22px;
.menu-type-icon
{
margin:
4px 0 0px 22px;
}
.left {
.ant-menu-submenu-arrow{
display:none !important;
.ant-menu-submenu-arrow
{
display:
none !important;
}
}
}
...
...
@@ -144,15 +147,17 @@
// }
}
.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;
}
.ant-menu-submenu-popup{
left:67px !important;
.ant-menu-submenu-popup
{
left:
67px !important;
}
.ant-menu-submenu-popup
>
.ant-menu {
.ant-menu-submenu-popup
>
.ant-menu {
background: @menu-bakg !important;
color: #333;
width: 132px;
...
...
@@ -160,18 +165,18 @@
li {
width: calc(100% - 16px);
padding-left: 20px;
margin:
12px
8px !important;
&:hover{
background: #
F3F6FA
;
margin:
12px
8px !important;
&:hover
{
background: #
f3f6fa
;
border-radius: 2px;
color:#333 !important;
color:
#333 !important;
}
}
.ant-menu-item-selected {
background: @active-color;
color: #fff;
&:hover{
&:hover
{
color: #fff !important;
}
}
...
...
src/modules/root/Menu.tsx
View file @
21e43782
...
...
@@ -122,8 +122,18 @@ function Aside(props: any) {
return
(
<
SubMenu
key=
{
item
.
groupCode
}
style=
{
{
marginTop
:
0
,
backgroundColor
:
!
menuType
&&
item
.
groupCode
===
selectKeyParent
?
'#2966FF'
:
'#fff'
}
}
icon=
{
<
img
src=
{
!
menuType
&&
item
.
groupCode
===
selectKeyParent
?
item
.
selectImg
:
item
.
img
}
className=
'icon-img'
></
img
>
}
style=
{
{
marginTop
:
0
}
}
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
>
:
''
}
onTitleClick=
{
()
=>
onOpenChange
(
item
.
groupCode
)
}
>
{
item
.
children
.
map
((
_item
:
any
,
_index
:
any
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment