Commit 6a6fdcc4 authored by XieZhiXiong's avatar XieZhiXiong

chore: 调整 Upload 组件数据结构

parent 126d2fcc
...@@ -111,7 +111,7 @@ const normalizeFileList = fileList => { ...@@ -111,7 +111,7 @@ const normalizeFileList = fileList => {
status: file.status, status: file.status,
name: file.name, name: file.name,
url: file.downloadURL || file.imgURL || file.url, url: file.downloadURL || file.imgURL || file.url,
...file.response, ...file.response.data,
thumbUrl: file.imgURL || getImageByUrl(file.downloadURL || file.url, { thumbUrl: file.imgURL || getImageByUrl(file.downloadURL || file.url, {
exclude: ['.png', '.jpg', '.jpeg', '.gif'] exclude: ['.png', '.jpg', '.jpeg', '.gif']
}) })
......
...@@ -100,7 +100,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({ ...@@ -100,7 +100,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
...rest, ...rest,
fileList: fileList.map(item => item.status === 'done' && ({ fileList: fileList.map(item => item.status === 'done' && ({
name: item.name, name: item.name,
proveUrl: item.data.url, proveUrl: item.url,
})).filter(Boolean), })).filter(Boolean),
}, },
}, 'uploadVoucher'); }, 'uploadVoucher');
......
This diff is collapsed.
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