-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
1.4.10
Environment
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Reproduction link
https://github.com/vueComponent/ant-design-vue.git
Steps to reproduce
在给Upload组件传值defaultFileList对象中设置url为.do类型的后缀名(非常规的jpg, jpeg, gif等等后缀名)时,代码如下
<a-upload
.....
:defaultFileList="fileList"
export default {
data() {
return {
fileList: [
{
uid: '-1',
name: 'xxx.png',
status: 'done',
url: 'xxx.do',
}
],
};
},
};
What is expected?
期望能正常显示图片
What is actually happening?
图片显示为一个file icon。而不是图片。
查找到是在这个文件中/ant-design-vue/es/upload/UploadList.js中isImageUrl方法中会检测图片url的后缀名,如果不是常规图片后缀名,return false, 但是图片中也有一种形式,通过后端.do接口返回数据流。而数据流是图片。这里可以改造或者可配置?