import { Switch ,NavLink,withRouter} from 'react-router-dom'; import RouterView from '@/router/routerConfig' import {useState,useEffect,Suspense} from 'react' import routerMap from './router/router' import style from './App.module.less' function App(props:any) { const [footerShow, setFooterShow] = useState(false) const routerChange = () => { const targetRouter = routerMap.find((item: any) => item.path === props.location.pathname); setFooterShow(targetRouter?.footerShow) } useEffect(() => { routerChange() }, [props.location]) return (