MaskProgress.js 1.9 KB
import React,{PropTypes} from 'react';
import ReactDOM from 'react-dom';      
import cx from 'classnames';
import l from './mask.les';
import { Progress,Row,Col,Spin} from 'antd';
let s = {};

class MaskProgress extends React.Component {
    constructor(props) {
        super(props); 
        this.state={
            percent:10
        }
    }
    static propTypes = {    
       title:PropTypes.string,
       taskMask:PropTypes.object,
       show:PropTypes.bool
    }  
    static defaultProps={ 
        title:'此操作可能耗费较长时间,请等待......', 
        show:false,
        close:()=>{

        }
    }  
    componentDidMount(){  
    }  
    componentWillReceiveProps(nextProps){   
    }
    componentDidUpdate(prevProps,prevState){  
    }
    componentWillUnmount() {  
        
    }  
    render(){      
        const {taskMask,show,title}=this.props; 
        if(show){
            // return (
            //     <div className={cx(l.progress_mask_wrap)}>
            //         <div className={cx(l.progress_wrap)}> 
            //             <div style={{marginBottom:'16px'}}>{title} </div>
            //             <div>
            //                 <Spin size="small" />
            //                 <Spin />
            //                 <Spin size="large" />
            //             </div>
            //         </div> 
            //     </div>
            // ) 
            return (
                <div className={cx(l.progress_mask_wrap)}>
                    <div style={{width:'100%',height:'100%'}} className={cx(l.progress_wrap,l.lds_double_ring)}>
                        <div></div>
                        <div></div>
                        <span className={cx(l.progress_title)}>{title}</span>
                    </div> 
                </div>
            )
        }else{
            return null;
        } 
    }
}



export default MaskProgress;