Commit 27d056f5 by maolipeng

feat:增加侧边栏版本信息

parent 81d33c35
...@@ -128,6 +128,35 @@ ...@@ -128,6 +128,35 @@
// display:inline-block; // 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 { .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background:@active-color !important; background:@active-color !important;
......
...@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from 'react'; ...@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from 'react';
import { import {
withRouter, withRouter,
} from 'react-router-dom'; } from 'react-router-dom';
import { Menu} from 'antd'; import { Menu, Popover } from 'antd';
import { menuList } from '../../routes//config/menuList' import { menuList } from '../../routes//config/menuList'
import { XMContext } from '../../store/context'; import { XMContext } from '../../store/context';
import _ from 'underscore'; import _ from 'underscore';
...@@ -14,6 +14,8 @@ function Aside(props: any) { ...@@ -14,6 +14,8 @@ function Aside(props: any) {
const ctx: any = useContext(XMContext); const ctx: any = useContext(XMContext);
const [selectKey, setSelectKey] = useState(); const [selectKey, setSelectKey] = useState();
const [openKeys, setOpenKeys] = useState(['']); const [openKeys, setOpenKeys] = useState(['']);
const [versionName,setVersionName] = useState("标准版")
const [expirationTime,setExpirationTime] = useState("2021-06-10")
const rootSubmenuKeys = _.pluck(menuList, 'groupCode'); const rootSubmenuKeys = _.pluck(menuList, 'groupCode');
useEffect(() => { useEffect(() => {
const link = props.location.pathname; const link = props.location.pathname;
...@@ -123,7 +125,15 @@ function Aside(props: any) { ...@@ -123,7 +125,15 @@ function Aside(props: any) {
} }
</Menu> </Menu>
</div> </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> </div>
</Popover>
</div> </div>
); );
} }
......
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