-
-
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
fix: enhance upload custom progress bar #24339
fix: enhance upload custom progress bar #24339
Conversation
- fix progress bar `type` could be overridden - update demo
@@ -177,7 +177,7 @@ export default class UploadList extends React.Component<UploadListProps, any> { | |||
// show loading icon if upload progress listener is disabled | |||
const loadingProgress = | |||
'percent' in file ? ( | |||
<Progress type="line" {...progressProps} percent={file.percent} /> | |||
<Progress {...progressProps} type="line" percent={file.percent} /> |
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.
在 API 上注明一下吧,只支持 line
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.
progressProps 的 ts 定义也可以把 type 和 percent 都 Omit 掉。
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.
progressProps 的 ts 定义也可以把 type 和 percent 都 Omit 掉。
already done in
export type UploadListProgressProps = Omit<ProgressProps, 'percent' | 'type'>; |
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.
cool
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
type
could be overridden📝 Changelog
☑️ Self Check before Merge
View rendered components/upload/demo/customize-progress-bar.md