|
|
|
@ -84,11 +84,15 @@ const ImageUpload = ({ disabled }) => {
|
|
|
|
|
}
|
|
|
|
|
if (info.file.status === 'done') {
|
|
|
|
|
// 会闪烁
|
|
|
|
|
setComplexMsg({...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: complexMsg.data.dataUri}})
|
|
|
|
|
setComplexMsg({
|
|
|
|
|
...complexMsg,
|
|
|
|
|
status: info.file.status,
|
|
|
|
|
data: { ...complexMsg.data, uri: complexMsg.data.dataUri, [`${complexMsg.type}URL`]: complexMsg.data.dataUri },
|
|
|
|
|
});
|
|
|
|
|
// message.success(`${info.file.name} file uploaded successfully`);
|
|
|
|
|
} else if (info.file.status === 'error') {
|
|
|
|
|
message.error(`添加失败`);
|
|
|
|
|
setComplexMsg({ ...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: ''} })
|
|
|
|
|
setComplexMsg({ ...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: '', [`${complexMsg.type}URL`]: '' } });
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|