22 lines
680 B
TypeScript
22 lines
680 B
TypeScript
|
|
import { PageLoading } from '@ant-design/pro-components';
|
|||
|
|
import { Spin } from 'antd';
|
|||
|
|
import { isJobPortalPage } from '@/utils/routeContext';
|
|||
|
|
import './loading.less';
|
|||
|
|
|
|||
|
|
/** 路由 chunk 加载时的占位(Umi 约定入口) */
|
|||
|
|
export default function RouteLoading() {
|
|||
|
|
const pathname = typeof window !== 'undefined' ? window.location.pathname : '';
|
|||
|
|
|
|||
|
|
if (isJobPortalPage(pathname)) {
|
|||
|
|
return (
|
|||
|
|
<div className="job-portal-route-loading">
|
|||
|
|
<Spin size="large" />
|
|||
|
|
<p className="job-portal-route-loading__title">正在加载页面</p>
|
|||
|
|
<p className="job-portal-route-loading__hint">请稍候</p>
|
|||
|
|
</div>
|
|||
|
|
);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return <PageLoading />;
|
|||
|
|
}
|