import React from 'react';
import {Modal,  message } from 'antd';
import loadingGif from '../../assets/images/gif/loadingGif.gif'
/**
 * 注释：
 * @ByYQL 全局公共组件 Loading加载中使用
 * 注：该组件适用于加载中使用
 * Create 2021-12-3
 */
class ShowLoadModal extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            visible: false,//弹框显示状
        }
    }

    componentDidMount() {
        this.props.onRef(this);
    }
    componentWillUnmount() {

    }

    showModal = () => {
        this.setState({
            visible: true,
        });
    };
    close = () => {
        this.setState({
            visible: false,
        });
    };

    render() {
        const { visible } = this.state;
        return (
            <div className="">
                <Modal
                    width='-200px'
                    visible={visible}
                    // title={[<div></div>]}
                    centered={true}
                    footer={null}
                    closable={false}>
                    <img width='300px' src={loadingGif} alt=""/>
                </Modal>
            </div>
        )
    }
}
export default ShowLoadModal
