fix: 1.修正ImageUpload直接使用时无法正常回传value 2.修正ImageUpload无法正常初始化第一次传值 (#3704)

This commit is contained in:
1455668754 2024-03-31 07:01:51 +08:00 committed by GitHub
parent c7ab4a5298
commit b5c87cf6ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,6 +92,10 @@
}) as UploadProps['fileList'];
}
},
{
immediate: true,
deep: true,
},
);
function getBase64<T extends string | ArrayBuffer | null>(file: File) {
@ -121,6 +125,7 @@
index !== -1 && fileList.value.splice(index, 1);
const value = getValue();
isInnerOperate.value = true;
emit('update:value', value);
emit('change', value);
emit('delete', file);
}
@ -168,6 +173,7 @@
info.onSuccess!(res.data);
const value = getValue();
isInnerOperate.value = true;
emit('update:value', value);
emit('change', value);
} catch (e: any) {
console.log(e);