mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-27 23:12:16 +08:00
fix: successPercent should decide the progress status when it exists, close #9382
This commit is contained in:
parent
fe4d294c64
commit
e361df0774
@ -60,8 +60,8 @@ export default class Progress extends React.Component<ProgressProps, {}> {
|
|||||||
prefixCls, className, percent = 0, status, format, trailColor, size, successPercent,
|
prefixCls, className, percent = 0, status, format, trailColor, size, successPercent,
|
||||||
type, strokeWidth, width, showInfo, gapDegree = 0, gapPosition, ...restProps,
|
type, strokeWidth, width, showInfo, gapDegree = 0, gapPosition, ...restProps,
|
||||||
} = props;
|
} = props;
|
||||||
const progressStatus = parseInt(percent.toString(), 10) >= 100 && !('status' in props) ?
|
const progressStatus = parseInt((successPercent ? successPercent.toString() : percent.toString()), 10) >= 100 &&
|
||||||
'success' : (status || 'normal');
|
!('status' in props) ? 'success' : (status || 'normal');
|
||||||
let progressInfo;
|
let progressInfo;
|
||||||
let progress;
|
let progress;
|
||||||
const textFormatter = format || (percentNumber => `${percentNumber}%`);
|
const textFormatter = format || (percentNumber => `${percentNumber}%`);
|
||||||
|
Loading…
Reference in New Issue
Block a user