dev_hjm
hjm 6 years ago
parent ffe398bd52
commit 8256ede495

@ -553,10 +553,12 @@ class MemoNew extends Component {
return attachments; return attachments;
} }
handleChange = (info) => { handleChange = (info) => {
let fileList = info.fileList; if (info.file.status === 'uploading' || info.file.status === 'done') {
this.setState({ let fileList = info.fileList;
fileList: appendFileSizeToUploadFileAll(fileList) this.setState({
}); fileList: appendFileSizeToUploadFileAll(fileList)
});
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
this.props.confirm({ this.props.confirm({
@ -624,7 +626,7 @@ class MemoNew extends Component {
console.log('beforeUpload', file.name); console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 150; const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) { if (!isLt150M) {
// message.error('文件大小必须小于150MB!'); this.props.showNotification('文件大小必须小于150MB!');
} }
return isLt150M; return isLt150M;
}, },

Loading…
Cancel
Save