Commit f81817bb authored by 邓晓峰's avatar 邓晓峰

feat: 修复菜单索引

parent dd0d503b
......@@ -351,16 +351,16 @@ const BasicLayout = props => {
* web4全屏退出,切换三级菜单高亮
*/
useEffect(() => {
const routes = currentRoutes.routes[selectIndex];
if(routes) {
if( routes && routes.routes) {
const route = routes && routes.routes && routes.routes.find(item => item.path === decodeURI(window.location.pathname.replace('/civbase', '')));
if(route && route.path) {
setTabActiveKey(route.path)
if(selectIndex !== -1) {
const routes = currentRoutes.routes[selectIndex];
if(routes) {
if( routes && routes.routes) {
const route = routes && routes.routes && routes.routes.find(item => item.path === decodeURI(window.location.pathname.replace('/civbase', '')));
if(route && route.path) {
setTabActiveKey(route.path)
}
}
}
}
}, [props.location]);
// window.share.event.on('event:history', params => {
......@@ -650,7 +650,7 @@ const BasicLayout = props => {
}
<div id="micro-container" className="subapp-container">
<CreateBaseMap/>
{/*<CreateBaseMap/>*/}
{props.children}
</div>
</PageContainer>
......
......@@ -22,13 +22,6 @@ class CreateMap extends React.Component {
};
componentDidMount() {
debugger
this.mapManganerRef.current.props.getViewInfo(view => {
console.log(view);
})
}
render() {
return (
<>
......
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