添加全局loading

This commit is contained in:
hanhh
2021-09-18 15:08:45 +08:00
parent 6c87634bb3
commit 698c463c3a
4 changed files with 35 additions and 21 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import ProLayout from '@ant-design/pro-layout';
import ProLayout, { PageLoading } from '@ant-design/pro-layout';
import {
enable as enableDarkMode,
disable as disableDarkMode,
@@ -89,7 +89,9 @@ export default function (props: any) {
!navigator.userAgent.includes('Chrome');
const isQQBrowser = navigator.userAgent.includes('QQBrowser');
return (
return loading ? (
<PageLoading />
) : (
<ProLayout
selectedKeys={[props.location.pathname]}
loading={loading}