feat(upload): tests & features & bugs #2418
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
发布时,升组件第 2 位版本号
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
📝 更新日志
feat(Upload): 可拖拽的单图片/单文件上传,支持使用
fileListDisplay
自定义文件信息内容feat(Upload): 一个请求上传多个文件时,去除重复参数
file
,保留file[0]
file[1]
即可,同时新增参数length
表示本次上传文件的数量feat(Upload):
onError/onSuccess/onProgress
添加关键事件参数XMLHttpRequest
,用于获取上传请求更详细的信息feat(Upload):
tips
支持插槽,支持函数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-flow
且autoUpload=false
时,change 事件第一个参数丢失 file.url 问题fix(Upload): 修复非自动上传场景
change
事件第二个参数file
值并非当前文件问题fix(Upload): 修复各类插槽无效和事件无效问题
test(Upload): 输出完整的测试用例(135 个),平均覆盖率达
95%+
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单