chromesetting
杨树明 5 years ago
parent 111cca2965
commit 49c76d1462

@ -300,6 +300,11 @@ class TPMDataset extends Component {
this.setState({ this.setState({
Buttonloading:true Buttonloading:true
}) })
if(!info.file.status){
this.setState({
Buttonloading:false
})
}
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){ if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
let fileList = info.fileList; let fileList = info.fileList;
@ -323,9 +328,9 @@ class TPMDataset extends Component {
} }
} }
}else{ }else{
this.setState({ // this.setState({
Buttonloading:false // Buttonloading:false
}) // })
} }
if(info.file.response){ if(info.file.response){
@ -465,9 +470,9 @@ class TPMDataset extends Component {
} }
ButtonloadinghandleChange=()=>{ ButtonloadinghandleChange=()=>{
// this.props.showNotification(`zhzzzzz`); // this.props.showNotification(`zhzzzzz`);
this.setState({ // this.setState({
Buttonloading:false // Buttonloading:false
}) // })
} }
render() { render() {
const {tpmLoading, shixun, user, match} = this.props; const {tpmLoading, shixun, user, match} = this.props;
@ -495,12 +500,11 @@ class TPMDataset extends Component {
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
beforeUpload: (file) => { beforeUpload: (file) => {
//上传前的操作 //上传前的操作
// console.log('beforeUpload', file.name); console.log('beforeUpload', file);
// this.props.showNotification(`文件上传中`); // this.props.showNotification(`文件上传中`);
const isLt400M = file.size / 1024 / 1024 <= 400; const isLt400M = file.size / 1024 / 1024 <= 1;
if (!isLt400M) { if (!isLt400M) {
this.ButtonloadinghandleChange
this.props.showNotification('文件大小必须小于等于400MB!'); this.props.showNotification('文件大小必须小于等于400MB!');
} }
return isLt400M; return isLt400M;

Loading…
Cancel
Save