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 file upload component #669

Merged
merged 4 commits into from
Jan 18, 2022

Conversation

typistZxd
Copy link
Member

fix #605

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

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Component style update
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

What is the new behavior?

add file upload component

Other information

@idux-bot
Copy link

idux-bot bot commented Dec 27, 2021

This preview will be available after the AzureCI is passed.

@typistZxd typistZxd changed the title feat(comp:upload): add file upload component WIP:feat(comp:upload): add file upload component Dec 27, 2021
@codecov
Copy link

codecov bot commented Dec 27, 2021

Codecov Report

Merging #669 (53a52ac) into main (04e2dda) will increase coverage by 0.12%.
The diff coverage is 87.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #669      +/-   ##
==========================================
+ Coverage   85.34%   85.46%   +0.12%     
==========================================
  Files         402      420      +18     
  Lines       10131    10673     +542     
  Branches     2373     2507     +134     
==========================================
+ Hits         8646     9122     +476     
- Misses       1485     1551      +66     
Impacted Files Coverage Δ
packages/components/i18n/src/locales/en-US.ts 100.00% <ø> (ø)
packages/components/i18n/src/locales/zh-CN.ts 100.00% <ø> (ø)
packages/components/progress/index.ts 100.00% <ø> (ø)
...es/components/upload/src/composables/useRequest.ts 76.13% <76.13%> (ø)
packages/components/upload/src/util/request.ts 76.36% <76.36%> (ø)
.../components/upload/src/composables/useOperation.ts 82.05% <82.05%> (ø)
...kages/components/upload/src/composables/useDrag.ts 85.71% <85.71%> (ø)
packages/components/upload/src/util/fileHandle.ts 87.50% <87.50%> (ø)
...es/components/upload/src/composables/useDisplay.ts 87.87% <87.87%> (ø)
packages/components/upload/src/Upload.tsx 90.90% <90.90%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04e2dda...53a52ac. Read the comment docs.

@typistZxd typistZxd force-pushed the feat-fileUpload-zxd branch 6 times, most recently from dd74fdb to 2f1d01b Compare January 3, 2022 16:31
@typistZxd typistZxd changed the title WIP:feat(comp:upload): add file upload component feat(comp:upload): add file upload component Jan 4, 2022
Copy link
Member

@danranVm danranVm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重点 review 了 API 的设计,代码实现细节我就没有仔细看了。

packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/config/src/types.ts Outdated Show resolved Hide resolved
packages/components/config/src/defaultConfig.ts Outdated Show resolved Hide resolved
packages/components/upload/style/index.ts Show resolved Hide resolved
packages/components/upload/index.ts Outdated Show resolved Hide resolved
packages/components/upload/src/List.tsx Outdated Show resolved Hide resolved
Copy link
Member

@danranVm danranVm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我发现三种类型对应的子组件其实也是差不多的,只不过是 item 不一样,我建议是不是抽 3 个不的 item 就好了。

packages/components/upload/src/Upload.tsx Outdated Show resolved Hide resolved
packages/components/upload/src/util/request.ts Outdated Show resolved Hide resolved
@typistZxd
Copy link
Member Author

我发现三种类型对应的子组件其实也是差不多的,只不过是 item 不一样,我建议是不是抽 3 个不的 item 就好了。

三种类型相互之间存在不止item上的细节差异(比如imageCard类型和其余两种差异不止item,还存在自身特殊的selector等),为方便单个类型之后扩展,建议保留,也可为用户自定义列表提供样例

@typistZxd
Copy link
Member Author

@danranVm review已修改,请查看

packages/components/config/src/types.ts Outdated Show resolved Hide resolved
packages/components/upload/demo/MaxCount.vue Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/src/Upload.tsx Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
packages/components/upload/docs/Index.zh.md Outdated Show resolved Hide resolved
@danranVm danranVm merged commit 91f501a into IDuxFE:main Jan 18, 2022
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.

[comp:upload]新增文件上传组件
2 participants