New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upload add download icon #18664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
Deploy preview for ant-design ready! Built with commit eaf7201 |
|
@afc163 1、超长文件名 2、log 已改 |
|
好的 |
components/config-provider/__tests__/__snapshots__/components.test.js.snap
Outdated
Show resolved
Hide resolved
@afc163 这是什么代码又报错了? |
onDownload里面需要自定义下载方法吗?目前的下载按钮打开csv文件连接时进入新标签页,但是不触发下载 |
@sunxia628 那是因为你的浏览器支持打开csv文件,如果不支持就会触发下载。你可以试试右键链接,另存为。。。 |
没有,打开后是空页面,也并没有访问到文件,另存为存储的是当前页面的html |
那你这不是链接的那种。 |
我尝试了按钮这种是可以下载的, |
@@ -16,6 +16,7 @@ export default class UploadList extends React.Component<UploadListProps, any> { | |||
showInfo: false, | |||
}, | |||
showRemoveIcon: true, | |||
showDownloadIcon: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉应该改成默认为 false,咨询去掉的反馈比较多。@crazyair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,帮忙改成 false 把,这个需要后端支持,一般场景用不到。
对,默认的行为就是打开连接,浏览器支持的格式会渲染出来,不支持的会触发下载。 |
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge