如何提高进度和容量

How to increase progress antd capacity

我正在使用 Ant Design 组件 Progress。我需要增加它的容量。例如填写500%。现在当 percent 的数量增加超过 100 时,它会填充。我该怎么做?

<Progress percent={percent} type="line" size="small" status="active" />;

我就是这么用的

试试这个:

<Progress type="line" steps={500} size="small" status="active"/>

但是您必须将 percent 属性设置在 0 到 100 之间。 如果不是,则必须将其分成 5。

试试这个例子:https://stackblitz.com/edit/react-winiec

您可以根据总百分比要求动态更新百分比

<Progress percent={25} format={percent => `${percent*5} %`} />