Commit da40b112 authored by 李纪文's avatar 李纪文

fix: 修改加载组件

parent 3f2cf905
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { Spin } from 'antd';
let timer = null;
const LoadBox = ({
delay,
......@@ -20,6 +22,9 @@ const LoadBox = ({
timer = setTimeout(() => {
setloadTip(timeoutTip);
}, timeout);
return () => {
if (timer) clearTimeout(timer);
};
}, [spinning]);
return (
<Spin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment