From c235b08e0e1f965357b34e0dbd6d8605fd6c68df Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Sat, 16 May 2020 13:46:06 +0800 Subject: [PATCH] 最新消息修改、附件下载 --- src/components/page/DocumentDetailPage/index.jsx | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/page/DocumentDetailPage/index.jsx b/src/components/page/DocumentDetailPage/index.jsx index 24bc71a..184a6dd 100644 --- a/src/components/page/DocumentDetailPage/index.jsx +++ b/src/components/page/DocumentDetailPage/index.jsx @@ -58,7 +58,7 @@ documentType: res.documentType || 'DT00002' }, loading: false, - fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix, })) || [] + fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix, status: 'done' })) || [] }); }); } @@ -136,6 +136,14 @@ header: { Authorization: window.localStorage.getItem('token') }, + showUploadList: { + showDownloadIcon: true, + showRemoveIcon: false, + showPreviewIcon: true + }, + onDownload: (file) => { + console.log('file', file) + }, onChange: ({ file, fileList }) => { fileList = fileList.slice(-2); fileList = fileList.map(file => { @@ -151,7 +159,6 @@ onPreview: (file) => { window.open(file.url); }, - showUploadList: { showPreviewIcon: true, showDownloadIcon: true, showRemoveIcon: false } }; return ( -- Gitblit v1.8.0