Repository navigation
fix(Upload): preserve file list changes during auto upload - #6969
Merged
uyarn merged 2 commits intoSep 17, 2026
Merged
Conversation
yunfeizhu
requested review from
Cat1007,
PengYYYYY,
Wesley-0808,
chaishi,
liweijie0812,
uyarn,
zhangpaopao0609 and
zydemail
as code owners
September 14, 2026 07:58
Collaborator
TDesign Component Site Preview Open
|
commit: |
uyarn
approved these changes
Sep 17, 2026
6 of 16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

🤔 这个 PR 的性质是?
🔗 相关 Issue
Fixes #6968
💡 需求背景和解决方案
自动上传新附件时,用户删除已有附件,上传完成后却会把旧附件重新写回
files。原因是上传结果使用了请求开始时的附件列表。自动追加模式下,让上传函数只返回本次上传结果,完成后再与当前列表合并。这样保留上传期间对已有附件的删除、修改和补充,
change与success.fileList也会得到同一份最终列表。单文件替换、整批替换和手动上传继续沿用原有路径。独立复现示例
验证:
files/modelValue/defaultFiles、两种请求模式、删除、更新、失败后重新选择上传和服务端files响应,并检查替换模式及手动上传。原始实现有 14 个用例失败,修复后 19 个全部通过。test:unit --maxWorkers=2:4,594 passed,3 todo。Upload 的 159 个测试全部通过。test:snap --maxWorkers=2:4,575 passed,19 skipped,3 todo;Upload 的 159 个测试全部通过。pnpm run lint:通过,含 TypeScript 和 ESLint 检查。pnpm run build:vue:通过。📝 更新日志
tdesign-vue-next
☑️ 请求合并前的自查清单