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
27d056f5
Commit
27d056f5
authored
Jun 10, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加侧边栏版本信息
parent
81d33c35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletions
+40
-1
src/modules/root/Menu.less
+29
-0
src/modules/root/Menu.tsx
+11
-1
yarn.lock
+0
-0
No files found.
src/modules/root/Menu.less
View file @
27d056f5
...
...
@@ -128,6 +128,35 @@
// display:inline-block;
// }
// }
.version-info {
position: absolute;
height: 74px;
bottom: 0;
width: 100%;
cursor: pointer;
.version-name {
font-size: 14px;
text-align: center;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 20px;
margin: 0 auto;
}
.expiration-time {
width: 129px;
height: 24px;
text-align: center;
border-radius: 2px;
border: 1px solid #E8E8E8;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 22px;
margin: 6px auto 0 auto;
}
}
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background:@active-color !important;
...
...
src/modules/root/Menu.tsx
View file @
27d056f5
...
...
@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from 'react';
import
{
withRouter
,
}
from
'react-router-dom'
;
import
{
Menu
}
from
'antd'
;
import
{
Menu
,
Popover
}
from
'antd'
;
import
{
menuList
}
from
'../../routes//config/menuList'
import
{
XMContext
}
from
'../../store/context'
;
import
_
from
'underscore'
;
...
...
@@ -14,6 +14,8 @@ function Aside(props: any) {
const
ctx
:
any
=
useContext
(
XMContext
);
const
[
selectKey
,
setSelectKey
]
=
useState
();
const
[
openKeys
,
setOpenKeys
]
=
useState
([
''
]);
const
[
versionName
,
setVersionName
]
=
useState
(
"标准版"
)
const
[
expirationTime
,
setExpirationTime
]
=
useState
(
"2021-06-10"
)
const
rootSubmenuKeys
=
_
.
pluck
(
menuList
,
'groupCode'
);
useEffect
(()
=>
{
const
link
=
props
.
location
.
pathname
;
...
...
@@ -123,7 +125,15 @@ function Aside(props: any) {
}
</
Menu
>
</
div
>
</
div
>
<
Popover
placement=
"rightBottom"
content=
"sss"
style=
{
{
width
:
"352px"
,
height
:
"198px"
}
}
>
<
div
className=
"version-info"
>
<
div
className=
"version-name"
>
{
`版本信息:${versionName}`
}
</
div
>
<
div
className=
"expiration-time"
>
{
`有效期至${expirationTime}`
}
</
div
>
</
div
>
</
Popover
>
</
div
>
);
}
...
...
yarn.lock
View file @
27d056f5
This diff is collapsed.
Click to expand it.
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