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
8685b0da
Commit
8685b0da
authored
May 30, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修正左侧导航样式
parent
9d1acf6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
28 deletions
+41
-28
src/modules/root/Menu.less
+15
-19
src/modules/root/Menu.tsx
+11
-4
src/routes/config/menuList.tsx
+15
-5
No files found.
src/modules/root/Menu.less
View file @
8685b0da
...
@@ -13,22 +13,11 @@
...
@@ -13,22 +13,11 @@
background: @menu-bakg;
background: @menu-bakg;
color: #333;
color: #333;
.menu-type-icon{
.menu-type-icon{
position: absolute;
margin:4px 0 4px 156px;
display:inline-block;
width: 24px;
height: 24px;
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #F1F3F6;
right:-12px;
top:29px;
text-align:center;
z-index:3;
cursor: pointer;
cursor: pointer;
.icon{
.icon{
font-size:1
1
px;
font-size:1
4
px;
}
}
display:none;
}
}
.ant-menu {
.ant-menu {
padding-left: 0 !important;
padding-left: 0 !important;
...
@@ -50,7 +39,6 @@
...
@@ -50,7 +39,6 @@
-webkit-flex: 1;
-webkit-flex: 1;
cursor: default;
cursor: default;
font-size: 16px;
font-size: 16px;
margin-top: 16px;
height: calc(~'100% - 72px');
height: calc(~'100% - 72px');
overflow: auto;
overflow: auto;
&::-webkit-scrollbar {
&::-webkit-scrollbar {
...
@@ -59,6 +47,11 @@
...
@@ -59,6 +47,11 @@
.icon {
.icon {
margin-right: 20px
margin-right: 20px
}
}
.icon-img{
width:16px;
height:16px;
margin-right:16px;
}
.listType {
.listType {
width: 5px;
width: 5px;
height: 5px;
height: 5px;
...
@@ -113,6 +106,9 @@
...
@@ -113,6 +106,9 @@
&.left-container-vertical {
&.left-container-vertical {
width: 62px;
width: 62px;
.menu-type-icon{
margin:4px 0 4px 22px;
}
.left {
.left {
.ant-menu-submenu-arrow{
.ant-menu-submenu-arrow{
display:none !important;
display:none !important;
...
@@ -122,11 +118,11 @@
...
@@ -122,11 +118,11 @@
.shink-footer {
.shink-footer {
left: 74px;
left: 74px;
}
}
&:hover{
//
&:hover{
.menu-type-icon{
//
.menu-type-icon{
display:inline-block;
//
display:inline-block;
}
//
}
}
//
}
}
}
.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;
...
...
src/modules/root/Menu.tsx
View file @
8685b0da
...
@@ -54,7 +54,7 @@ function Aside(props: any) {
...
@@ -54,7 +54,7 @@ function Aside(props: any) {
:
"left-container left-container-vertical"
:
"left-container left-container-vertical"
}
}
>
>
<
span
className=
"menu-type-icon"
onClick=
{
handleMenu
}
>
<
div
className=
"menu-type-icon"
onClick=
{
handleMenu
}
>
{
menuType
?
(
{
menuType
?
(
<
span
<
span
className=
"icon iconfont"
className=
"icon iconfont"
...
@@ -68,7 +68,7 @@ function Aside(props: any) {
...
@@ -68,7 +68,7 @@ function Aside(props: any) {


</
span
>
</
span
>
)
}
)
}
</
span
>
</
div
>
<
div
className=
"left"
>
<
div
className=
"left"
>
<
div
className=
"nav"
>
<
div
className=
"nav"
>
...
@@ -86,7 +86,8 @@ function Aside(props: any) {
...
@@ -86,7 +86,8 @@ function Aside(props: any) {
}
}
if
(
item
.
children
)
{
if
(
item
.
children
)
{
return
<
SubMenu
key=
{
item
.
groupCode
}
style=
{
{
marginTop
:
0
}
}
className=
"first-menu-item"
title=
{
<
div
>
return
<
SubMenu
key=
{
item
.
groupCode
}
style=
{
{
marginTop
:
0
}
}
className=
"first-menu-item"
title=
{
<
div
>
<
span
style=
{
{
marginRight
:
16
}
}
className=
"iconfont icon"
dangerouslySetInnerHTML=
{
{
__html
:
item
.
icon
}
}
></
span
>
{
/* <span style={{ marginRight: 16 }} className="iconfont icon" dangerouslySetInnerHTML={{ __html:item.icon}}></span> */
}
<
img
src=
{
item
.
img
}
className=
"icon-img"
></
img
>
{
menuType
&&
{
menuType
&&
<
span
>
{
item
.
groupName
}
</
span
>
<
span
>
{
item
.
groupName
}
</
span
>
}
</
div
>
}
</
div
>
...
@@ -105,8 +106,14 @@ function Aside(props: any) {
...
@@ -105,8 +106,14 @@ function Aside(props: any) {
</
SubMenu
>
</
SubMenu
>
}
else
{
}
else
{
return
<
Menu
.
Item
onClick=
{
()
=>
{
toggleMenu
(
item
)
}
}
key=
{
item
.
groupCode
}
className=
"first-menu-item"
>
return
<
Menu
.
Item
onClick=
{
()
=>
{
toggleMenu
(
item
)
}
}
key=
{
item
.
groupCode
}
className=
"first-menu-item"
>
{
/* <span style={{ marginRight: 16 }} className="iconfont icon" dangerouslySetInnerHTML={{ __html:item.icon}}></span> */
}
{
selectKey
===
item
.
groupCode
?
<
img
src=
{
item
.
selectImg
}
className=
"icon-img"
></
img
>
:
<
img
src=
{
item
.
img
}
className=
"icon-img"
></
img
>
}
<
span
style=
{
{
marginRight
:
16
}
}
className=
"iconfont icon"
dangerouslySetInnerHTML=
{
{
__html
:
item
.
icon
}
}
></
span
>
{
menuType
&&
{
menuType
&&
<
span
>
{
item
.
groupName
}
</
span
>
<
span
>
{
item
.
groupName
}
</
span
>
}
}
...
...
src/routes/config/menuList.tsx
View file @
8685b0da
/*
/*
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-21 15:53:31
* @Date: 2021-02-21 15:53:31
* @LastEditors:
wufan
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-05-
27 10:23:30
* @LastEditTime: 2021-05-
30 11:00:09
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -11,12 +11,15 @@ export const menuList: any = [
...
@@ -11,12 +11,15 @@ export const menuList: any = [
groupName
:
"中心首页"
,
groupName
:
"中心首页"
,
groupCode
:
"CloudPage"
,
groupCode
:
"CloudPage"
,
icon
:
''
,
icon
:
''
,
link
:
'/home'
link
:
'/home'
,
img
:
'https://image.xiaomaiketang.com/xm/ni3BFJDT3a.png'
,
selectImg
:
'https://image.xiaomaiketang.com/xm/GRDztTAWaM.png'
},
},
{
{
groupName
:
"课程管理"
,
groupName
:
"课程管理"
,
groupCode
:
"CloudCourse"
,
groupCode
:
"CloudCourse"
,
icon
:
''
,
icon
:
''
,
img
:
'https://image.xiaomaiketang.com/xm/jBGrGjM7HQ.png'
,
children
:
[
children
:
[
{
{
groupName
:
"直播课"
,
groupName
:
"直播课"
,
...
@@ -44,18 +47,23 @@ export const menuList: any = [
...
@@ -44,18 +47,23 @@ export const menuList: any = [
groupName
:
"知识库"
,
groupName
:
"知识库"
,
groupCode
:
"CloudKnowledge"
,
groupCode
:
"CloudKnowledge"
,
icon
:
''
,
icon
:
''
,
link
:
'/knowledge-base'
link
:
'/knowledge-base'
,
img
:
'https://image.xiaomaiketang.com/xm/8sbP5rGQWh.png'
,
selectImg
:
'https://image.xiaomaiketang.com/xm/hJKCfibC22.png'
},
},
{
{
groupName
:
"资料云盘"
,
groupName
:
"资料云盘"
,
groupCode
:
"CloudDisk"
,
groupCode
:
"CloudDisk"
,
icon
:
''
,
icon
:
''
,
link
:
'/resource-disk'
link
:
'/resource-disk'
,
img
:
'https://image.xiaomaiketang.com/xm/zGKbXJPzXx.png'
,
selectImg
:
'https://image.xiaomaiketang.com/xm/5sN4MzjxYc.png'
,
},
},
{
{
groupName
:
"培训管理"
,
groupName
:
"培训管理"
,
groupCode
:
"TrainManage"
,
groupCode
:
"TrainManage"
,
icon
:
''
,
icon
:
''
,
img
:
'https://image.xiaomaiketang.com/xm/Yy6pZ6G6kS.png'
,
children
:
[
children
:
[
{
{
groupName
:
"培训计划"
,
groupName
:
"培训计划"
,
...
@@ -68,6 +76,7 @@ export const menuList: any = [
...
@@ -68,6 +76,7 @@ export const menuList: any = [
groupName
:
"助学工具"
,
groupName
:
"助学工具"
,
groupCode
:
"AidTool"
,
groupCode
:
"AidTool"
,
icon
:
''
,
icon
:
''
,
img
:
'https://image.xiaomaiketang.com/xm/xsma4hx3b3.png'
,
children
:
[
children
:
[
{
{
groupName
:
"题库"
,
groupName
:
"题库"
,
...
@@ -90,6 +99,7 @@ export const menuList: any = [
...
@@ -90,6 +99,7 @@ export const menuList: any = [
groupName
:
"学院管理"
,
groupName
:
"学院管理"
,
groupCode
:
"CloudShop"
,
groupCode
:
"CloudShop"
,
icon
:
''
,
icon
:
''
,
img
:
'https://image.xiaomaiketang.com/xm/Q8i5RSMKNc.png'
,
children
:
[
children
:
[
{
{
groupName
:
"学院信息"
,
groupName
:
"学院信息"
,
...
...
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