Commit c16ca9bc authored by 田翔's avatar 田翔

fix: antd 上传附件bug -n

parent f85ae4cc
{
"name": "panda-xform",
"version": "5.2.4",
"description": "5.2.4 支持其他地址附件预览",
"version": "5.2.5",
"description": "5.2.5 未知原因出现antd上传组件图片显示异常",
"keywords": [
"panda-xform"
],
......
......@@ -223,9 +223,12 @@ const FileUpload = (props) => {
const iconRender = (file, listType) => {
if (listType !== 'text') {
let fileType = getFileType(file.name)
if (fileType) {
return <div className={styles.iconImg} type={fileType}></div>
if (fileType === '图片') {
return <img src={file.url}></img>
}
let type = getFileType(file.name)
if (type) {
return <div className={styles.iconImg} type={type}></div>
} else {
return <div className={styles.iconImg} type={'通用'}></div>
}
......@@ -242,7 +245,6 @@ const FileUpload = (props) => {
let uid = i + '_' + Math.random()
let _obj = {
uid: uid,
value: list[i],
name: list[i].split('\\').reverse()[0],
type: fileType === '图片' ? 'image/jpeg' : 'file',
status: 'done',
......
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