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

fix: 附件下载修复

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