-
-
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: resolve #24213 customize progress bar in upload #24319
Conversation
feature branch |
b2d2d02
to
4a9ecdb
Compare
之前在写的时候,发现 showInfo 为 true 的时候,显示的百分比会出现 不知道你这个 会不会 出现这种情况,有没有进行过处理? |
我拉下 feature 测试下 |
--- | ||
order: 999 | ||
title: | ||
zh-CN: Customize Progress Bar |
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.
中文
|
||
## zh-CN | ||
|
||
Customize Progress Bar with `progress` props. |
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.
中文
|
upload 样式有 确保全覆盖,样式都不会异常。 我的想法是 |
可以 新开一个 PR,补充这个。 |
@afc163 有没有必要去管 progress |
没必要,Upload 里面目前只有 line progress 的设计。 |
@morenyang |
传递到 Upload 的 progress type 写死好了,不给配。 |
May do some enhancements to make sure progress type won't be overridden by property in |
@@ -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" {...progressAttr} percent={file.percent} /> | |||
<Progress type="line" {...progressProps} 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.
--<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.
type 放后面 应该就行
如果我把默认 format 两位放到 defaultProps 里,用户自定义的时候还是没办法出来两位小数...所以在传props的时候先assign一下? |
我觉得用户自定义就不管了。 |
create new PR #24339 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
progress
property inUpload
, and replaceprogressAttr
property inUploadList
toprogress
.📝 Changelog
☑️ Self Check before Merge
View rendered components/upload/demo/customize-progress-bar.md