MaskProgress.js
1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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;