diff --git a/packages/app/src/components/form.fields/upload/index.tsx b/packages/app/src/components/form.fields/upload/index.tsx index 5f7042933..e0e16bccb 100644 --- a/packages/app/src/components/form.fields/upload/index.tsx +++ b/packages/app/src/components/form.fields/upload/index.tsx @@ -171,7 +171,7 @@ function toValues(fileList) { if (!Array.isArray(fileList) && typeof fileList === 'object') { fileList = [fileList]; } - return fileList.map(toValue); + return fileList.map(toValue).filter(item => item.id); } export function getImgUrls(value) { @@ -213,7 +213,8 @@ export const Upload = connect({ setImgIndex(index); setVisible(true); } else { - window.location.href = value.url; + window.open(value.url) + // window.location.href = value.url; } }} // itemRender={(originNode, file, fileList) => {