Add Dun Check For Project

This commit is contained in:
sylor_huang@126.com 2020-08-18 10:36:33 +08:00
parent 85d924db70
commit f2f910b5e4
1 changed files with 15 additions and 0 deletions

View File

@ -57,11 +57,26 @@ class Index extends Component {
handleChange = (info) => {
const { changeIsComplete } = this.props;
changeIsComplete && changeIsComplete(true);
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) });
this.fileIdList(fileList);
if ( info.file.status === 'done') {
let filelist = info.fileList && info.fileList.length>0 && info.fileList[info.fileList.length-1];
if(filelist && filelist.response && filelist.response.status === -1){
this.props.showNotification(filelist.response.message)
this.setState((state) => {
state.fileList.pop()
return {
fileList: state.fileList,
};
});
this.fileIdList(this.state.fileList);
}
}
}
}