import { MenuDataItem, getMenuData, getPageTitle } from '@ant-design/pro-layout'; import { Helmet, HelmetProvider } from 'react-helmet-async'; import { SelectLang, useIntl, ConnectProps, connect } from 'umi'; import React from 'react'; import { ConnectState } from '@/models/connect'; import styles from './UserLayout.less'; export interface UserLayoutProps extends Partial { breadcrumbNameMap: { [path: string]: MenuDataItem; }; } const UserLayout: React.FC = (props) => { const { route = { routes: [], }, } = props; const { routes = [] } = route; const { children, location = { pathname: '', }, } = props; const { formatMessage } = useIntl(); const { breadcrumb } = getMenuData(routes); const title = getPageTitle({ pathname: location.pathname, formatMessage, breadcrumb, ...props, }); return ( {title}
{/*
logo 中国联通电子招投标系统-开发
*/} {children}
); }; export default connect(({ settings }: ConnectState) => ({ ...settings }))(UserLayout);