有些代码框架比较呆,但前端调回显接口的时候让它睡一秒足够了
uploadPicOfExpert(formData).then(async(res) => {
if (res.data.id != null && res.data.id != "") {
message.success("上传成功!");
fileList.value[0].status = "done";
const info = { file: data.file, fileList: fileList.value };
filePicId.value = res.data.id;
handleChange(info);
}
//这里
setTimeout(() => {
getExpertImageBase64(modelRef.id).then((res) => {
imageUrl.value = res.data.picBase64;
});
},1000);
});
};