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(upload): add abstract prop, separate upload-file-list and upload-trigger components #1193

Merged
merged 9 commits into from
Sep 19, 2021

Conversation

kev1nzh37
Copy link
Collaborator

kev1nzh added 3 commits September 17, 2021 15:44
# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.zh-CN.md
#	src/upload/tests/Upload.spec.ts
@vercel
Copy link

vercel bot commented Sep 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/8Eretaf9er81ZUoqypwTiuQWRvYV
✅ Preview: https://naive-ui-git-fork-kev1nzh37-feature-upload-tusimple.vercel.app

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #1193 (cac57c4) into main (38cab50) will increase coverage by 0.21%.
The diff coverage is 82.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1193      +/-   ##
==========================================
+ Coverage   49.71%   49.93%   +0.21%     
==========================================
  Files         514      516       +2     
  Lines       12761    12789      +28     
  Branches     3617     3628      +11     
==========================================
+ Hits         6344     6386      +42     
+ Misses       5334     5316      -18     
- Partials     1083     1087       +4     
Impacted Files Coverage Δ
src/upload/src/interface.ts 100.00% <ø> (ø)
src/upload/src/UploadTrigger.tsx 72.00% <72.00%> (ø)
src/upload/src/Upload.tsx 44.27% <80.00%> (+2.44%) ⬆️
src/upload/src/UploadFileList.tsx 100.00% <100.00%> (ø)
src/spin/src/Spin.tsx 73.33% <0.00%> (-10.67%) ⬇️
src/anchor/src/Link.tsx 73.68% <0.00%> (ø)
src/spin/styles/light.ts 100.00% <0.00%> (ø)
src/anchor/src/AnchorAdapter.tsx 90.90% <0.00%> (ø)
src/descriptions/src/Descriptions.tsx 87.03% <0.00%> (ø)
... and 6 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 38cab50...cac57c4. Read the comment docs.

src/upload/src/Upload.tsx Outdated Show resolved Hide resolved
src/upload/src/Upload.tsx Outdated Show resolved Hide resolved
src/upload/src/UploadFileList.tsx Show resolved Hide resolved
src/upload/src/UploadFileList.tsx Outdated Show resolved Hide resolved
src/upload/src/UploadFileList.tsx Outdated Show resolved Hide resolved
src/upload/src/UploadTrigger.tsx Outdated Show resolved Hide resolved
src/upload/src/styles/index.cssr.ts Outdated Show resolved Hide resolved
src/upload/src/styles/index.cssr.ts Outdated Show resolved Hide resolved
src/upload/src/UploadTrigger.tsx Outdated Show resolved Hide resolved
src/upload/src/UploadTrigger.tsx Outdated Show resolved Hide resolved
</NFadeInExpandTransition>
)
const createUploadFileList = (
isImageCardTypeRef: ComputedRef<boolean>
Copy link
Collaborator

Choose a reason for hiding this comment

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

不需要传进来,直接用就行,引用的是一个东西

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好的 明天改

@lgtm-com
Copy link

lgtm-com bot commented Sep 19, 2021

This pull request introduces 1 alert when merging ae0761a into dbee08e - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@@ -5,6 +5,7 @@
### Breaking Changes

- `n-layout-sider`'s `arrow-circle` trigger is changed into new style.
- `n-upload` add `abstract` prop, add `n-upload-trigger` 和 `n-upload-file-list` component, closes [#1102](https://github.com/TuSimple/naive-ui/issues/1102).
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个不算 breaking change,因为用户已经写好的代码不会崩

openFileDialog,
draggerInsideRef,
handleFileAddition,
fileListStyle: props.fileListStyle,
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个地方也需要的是 toRef

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.

2 participants