任务详情日志添加loading

This commit is contained in:
hanhh 2021-09-18 16:33:12 +08:00
parent 698c463c3a
commit 39fb23c025

View File

@ -6,6 +6,7 @@ import {
Loading3QuartersOutlined, Loading3QuartersOutlined,
CheckCircleOutlined, CheckCircleOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { PageLoading } from '@ant-design/pro-layout';
enum CrontabStatus { enum CrontabStatus {
'running', 'running',
@ -88,7 +89,7 @@ const CronLogModal = ({
const titleElement = () => { const titleElement = () => {
return ( return (
<> <>
{excuting && <Loading3QuartersOutlined spin />} {(excuting || loading) && <Loading3QuartersOutlined spin />}
{!excuting && <CheckCircleOutlined />} {!excuting && <CheckCircleOutlined />}
<span style={{ marginLeft: 5 }}>-{cron && cron.name}</span>{' '} <span style={{ marginLeft: 5 }}>-{cron && cron.name}</span>{' '}
</> </>
@ -114,6 +115,7 @@ const CronLogModal = ({
bodyStyle={{ bodyStyle={{
overflowY: 'auto', overflowY: 'auto',
maxHeight: 'calc(80vh - var(--vh-offset, 0px))', maxHeight: 'calc(80vh - var(--vh-offset, 0px))',
minHeight: '300px',
}} }}
forceRender forceRender
onOk={() => cancel()} onOk={() => cancel()}
@ -124,7 +126,9 @@ const CronLogModal = ({
</Button>, </Button>,
]} ]}
> >
{!loading && value && ( {loading ? (
<PageLoading />
) : (
<pre <pre
style={ style={
isPhone isPhone