Commit 1ef50a36 authored by 田翔's avatar 田翔

fix: 附件下载修复

parent ac87d66b
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.8.5", "version": "4.8.8",
"description": "4.8.5 恢复缩略图", "description": "4.8.8 附件下载修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -73,11 +73,16 @@ const FileUpload = (props) => { ...@@ -73,11 +73,16 @@ const FileUpload = (props) => {
action: `${window.location.origin}${uploadFileUrl}`, action: `${window.location.origin}${uploadFileUrl}`,
listType: showType, listType: showType,
withCredentials: true, withCredentials: true,
showUploadList: download ? // showUploadList: download ?
{ // {
showDownloadIcon: '下载', // showDownloadIcon: '下载',
downloadIcon: <ArrowDownOutlined style={{ color: fileType === '图片' ? 'white' : '' }} />, // downloadIcon: <ArrowDownOutlined style={{ color: fileType === '图片' ? 'white' : '' }} />,
} : {}, // } : {},
showUploadList: {
showRemoveIcon: !disabled,
showDownloadIcon: download,
// downloadIcon: <ArrowDownOutlined style={{ color: fileType === '图片' ? 'white' : '' }} />,
},
beforeUpload(file, fileList) { beforeUpload(file, fileList) {
/** @Tips: 解决提交文件中存在特殊字符的问题 */ /** @Tips: 解决提交文件中存在特殊字符的问题 */
let _continueUpload = true; let _continueUpload = true;
...@@ -182,7 +187,7 @@ const FileUpload = (props) => { ...@@ -182,7 +187,7 @@ const FileUpload = (props) => {
return ( return (
<div className={styles.uploadBox}> <div className={styles.uploadBox}>
<Upload <Upload
disabled={disabled} // disabled={disabled}
accept={accepts[fileType]} accept={accepts[fileType]}
fileList={showList} fileList={showList}
className="upload-list-inline" className="upload-list-inline"
...@@ -191,7 +196,7 @@ const FileUpload = (props) => { ...@@ -191,7 +196,7 @@ const FileUpload = (props) => {
> >
{ {
showType !== 'picture-card' ? showType !== 'picture-card' ?
<Button icon={<UploadOutlined />}>{placeholder || '上传'}</Button> (disabled ? null : <Button icon={<UploadOutlined />}>{placeholder || '上传'}</Button>)
: (disabled ? null : (placeholder || '+ 上传')) : (disabled ? null : (placeholder || '+ 上传'))
} }
</Upload> </Upload>
......
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