上传失败结束loading效果

This commit is contained in:
谢思 2023-09-22 16:32:56 +08:00
parent f40aa56f92
commit cbce5d10cd
1 changed files with 1 additions and 1 deletions

View File

@ -30,11 +30,11 @@ function UploadImage({ getImage , url, getImageId, maxSize = 2, action = getUplo
if (!isLt2M) {
message.error(`上传的图片不能超过${maxSize}MB!`);
}
isJpgOrPng && isLt2M && setLoading(true);
return isJpgOrPng && isLt2M;
}
//
function handleChange(info){
setLoading(true);
if(info && info.file && info.file.status === "done"){
setLoading(false);
getImageId && getImageId(info.file.response.id);