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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
61 deletions
+76
-61
src/modules/root/Menu.less
+64
-59
src/modules/root/Menu.tsx
+12
-2
No files found.
src/modules/root/Menu.less
View file @
21e43782
@import '../../core/variables.less';
@import '../../core/variables.less';
@top-height: 0px;
@top-height: 0px;
@menu-bakg: #
FFF
;
@menu-bakg: #
fff
;
@active-color: #2966
FF
;
@active-color: #2966
ff
;
.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: #9
A9DA
7;
background: #9
a9da
7;
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: 1
3
px !important;
padding-left: 1
2
px !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;
}
}
}
}
...
...
src/modules/root/Menu.tsx
View file @
21e43782
...
@@ -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
)
=>
{
...
...
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