Skip to content
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

Upload Tests/Features/Bugs #1918

Merged
merged 11 commits into from
Jan 29, 2023
Merged

Conversation

chaishi
Copy link
Collaborator

@chaishi chaishi commented Jan 28, 2023

关联子仓库:Tencent/tdesign-common#1126

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • feat(Upload): 可拖拽的单图片/单文件上传,支持自定义文件信息内容
  • feat(Upload): 一个请求上传多个文件时,去除重复参数 file,保留 file[0] file[1] 即可,同时新增参数 length 表示本次上传文件的数量
  • feat(Upload): onError/onSuccess/onProgress 添加关键事件参数 XMLHttpRequest,用于获取上传请求更详细的信息
  • feat(Upload): tips 支持 ReactNode
  • feat(Upload): 新增上传请求超时也会执行 onError
  • feat(Upload): 支持事件 onCancelUpload
  • feat(Upload): 支持 mockProgressDuration,用于设置模拟上传进度间隔时间,大文件大一点,小文件小一点
  • fix(Upload): 修复 onSelectChange 事件第二个参数 currentSelectedFiles 不正确问题
  • fix(Upload): 修复 autoUpload=false 场景下,即使 beforeUpload 函数全部返回 false 依然会触发 onChange 事件问题
  • fix(Upload): 修复 data 为函数时,参数为空问题,补充参数 files
  • fix(Upload): 修复 theme=image-flow 时,无法使用 fileListDisplay 自定义图片列表问题
  • fix(Upload): 修复文件数量超出 max 时,且没有可继续上传的文件,依然触发 change 事件问题
  • fix(Upload): 修复 theme=file 或者 theme=image-flow 时,abridgeName 无效问题
  • fix(Upload): 修复 theme=image-flowautoUpload=false 时,change 事件第一个参数丢失 file.url 问题
  • fix(Upload): 修复非自动上传场景 change 事件第二个参数 file 值并非当前文件问题
  • test(Upload): 输出完整的测试用例(113 个),平均覆盖率达 95%+

image

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2023

完成

@chaishi chaishi mentioned this pull request Jan 28, 2023
61 tasks
@chaishi chaishi changed the title [WIP] Upload Tests/Features/Bugs Upload Tests/Features/Bugs Jan 28, 2023
@honkinglin honkinglin merged commit 4fc7ea9 into Tencent:develop Jan 29, 2023
@github-actions github-actions bot mentioned this pull request Feb 1, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants