-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[Feature Request] Progress supporting customize text format #11769
Comments
Translation of this issue: Existing Component Component Name Description
The
|
I would vote this request up! |
动态 更新 format 会导致 You may have an infinite update loop in a component render function. |
添加 |
Existing Component
是
Component Name
Progress
Description
当前进度条的 text 只支持显示百分比形式:75%,希望能够提供一个
format
属性,允许自定义文字格式,如:<progress percent="75" format="$percent 折"></progress>
显示 “75折"。
format
属性还可以是回调函数的形式,其参数为当前百分比。I hope I can customize the text format of Progress component, instead of only unique format "75%". For instance, the component provides
format
attribute and it can be String or Function. If it is a function, the argument will be current percent.<progress percent="70" format="$percent 折"></progress>
and the text of the component will be
75折
。The text was updated successfully, but these errors were encountered: