Commit 6a6fdcc4 authored by XieZhiXiong's avatar XieZhiXiong

chore: 调整 Upload 组件数据结构

parent 126d2fcc
......@@ -111,7 +111,7 @@ const normalizeFileList = fileList => {
status: file.status,
name: file.name,
url: file.downloadURL || file.imgURL || file.url,
...file.response,
...file.response.data,
thumbUrl: file.imgURL || getImageByUrl(file.downloadURL || file.url, {
exclude: ['.png', '.jpg', '.jpeg', '.gif']
})
......
......@@ -100,7 +100,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
...rest,
fileList: fileList.map(item => item.status === 'done' && ({
name: item.name,
proveUrl: item.data.url,
proveUrl: item.url,
})).filter(Boolean),
},
}, 'uploadVoucher');
......
......@@ -314,9 +314,6 @@ export function normalizeFiledata(url: any): any {
name: fileName,
status: 'done',
url,
data: {
url,
}, // formily Upload value 需要这个字段
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment