-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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 support maxCount
#28367
Conversation
|
||
## zh-CN | ||
|
||
通过 `maxCount` 限制上传数量。当为 `1` 时,始终用最新上传的代替当前。 |
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.
默认模式是替代还是禁止,感觉禁止比较好,类似 Select tags 或者 Checkbox 的最大限制,肯定不希望选了一个新的之后把旧的顶出去。
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.
云凤蝶那边问下来单个的文件没有禁止的需求,只有自动替换的需求。所以这边给 maxCount=1
做了一个特殊的规则。
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.
先上吧,看看社区反馈。
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 04ad2c3:
|
Codecov Report
@@ Coverage Diff @@
## feature #28367 +/- ##
========================================
Coverage 99.98% 99.98%
========================================
Files 393 393
Lines 7392 7395 +3
Branches 2128 2129 +1
========================================
+ Hits 7391 7394 +3
Misses 1 1
Continue to review full report at Codecov.
|
Size Change: +94 B (0%) Total Size: 790 kB
ℹ️ View Unchanged
|
feature 掉了一行测试覆盖。 |
modal 的 coverage 掉了和这个无关,外面发新 PR 修好了。 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
maxCount
to limit file count.maxCount
属性以限制文件数量。☑️ Self Check before Merge
View rendered components/upload/demo/max-count.md