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

feat(comp:upload): add onMaxCountExceeded #1673

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

sallerli1
Copy link
Contributor

refactor upload component

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

重构Upload组件,支持以下特性:

  1. 上传行为受控,即files的更改会直接触发上传和取消,不再只有点击选择文件可以触发上传
  2. onSelect 增加第二个参数,代表选中后被内部过滤掉的文件
  3. 新增 onMaxCountExceeded 事件,在选择文件突破最大限制时触发

Other information

@idux-bot
Copy link

idux-bot bot commented Sep 4, 2023

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #1673 (7d24448) into main (dc97ac1) will decrease coverage by 0.02%.
The diff coverage is 62.85%.

❗ Current head 7d24448 differs from pull request most recent head df82ca5. Consider uploading reports for the commit df82ca5 to get more accurate results

@@            Coverage Diff             @@
##             main    #1673      +/-   ##
==========================================
- Coverage   92.59%   92.58%   -0.02%     
==========================================
  Files         345      345              
  Lines       32285    32303      +18     
  Branches     3688     3688              
==========================================
+ Hits        29895    29908      +13     
- Misses       2390     2395       +5     
Files Changed Coverage Δ
packages/components/upload/src/Upload.tsx 48.83% <23.52%> (-1.17%) ⬇️
packages/components/upload/src/token.ts 100.00% <100.00%> (ø)
packages/components/upload/src/types.ts 100.00% <100.00%> (ø)

@sallerli1 sallerli1 merged commit 8faddc1 into IDuxFE:main Sep 8, 2023
7 checks passed
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.

None yet

1 participant