fix: filter failed files

This commit is contained in:
chenos 2021-01-08 09:23:51 +08:00
parent d321b95fb0
commit cd6d444a3f

View File

@ -171,7 +171,7 @@ function toValues(fileList) {
if (!Array.isArray(fileList) && typeof fileList === 'object') { if (!Array.isArray(fileList) && typeof fileList === 'object') {
fileList = [fileList]; fileList = [fileList];
} }
return fileList.map(toValue); return fileList.map(toValue).filter(item => item.id);
} }
export function getImgUrls(value) { export function getImgUrls(value) {
@ -213,7 +213,8 @@ export const Upload = connect({
setImgIndex(index); setImgIndex(index);
setVisible(true); setVisible(true);
} else { } else {
window.location.href = value.url; window.open(value.url)
// window.location.href = value.url;
} }
}} }}
// itemRender={(originNode, file, fileList) => { // itemRender={(originNode, file, fileList) => {