diff --git a/components/progress/line.tsx b/components/progress/line.tsx index 06afa9685..1ffdbaae5 100644 --- a/components/progress/line.tsx +++ b/components/progress/line.tsx @@ -51,8 +51,16 @@ export const handleGradient = strokeColor => { }; const Line = (_, { attrs, slots }) => { - const { prefixCls, percent, successPercent, strokeWidth, size, strokeColor, strokeLinecap } = - attrs; + const { + prefixCls, + percent, + successPercent, + strokeWidth, + size, + strokeColor, + strokeLinecap, + trailColor, + } = attrs; let backgroundProps; if (strokeColor && typeof strokeColor !== 'string') { backgroundProps = handleGradient(strokeColor); @@ -61,6 +69,12 @@ const Line = (_, { attrs, slots }) => { background: strokeColor, }; } + + const trailStyle = trailColor + ? { + style: { backgroundColor: trailColor }, + } + : undefined; const percentStyle = { width: `${validProgress(percent)}%`, height: `${strokeWidth || (size === 'small' ? 6 : 8)}px`, @@ -80,7 +94,7 @@ const Line = (_, { attrs, slots }) => { return (
-
+
{successSegment}
diff --git a/v2-doc b/v2-doc index 1882ee4e3..157cce105 160000 --- a/v2-doc +++ b/v2-doc @@ -1 +1 @@ -Subproject commit 1882ee4e30b707551a08561f090e72a3f261f6cf +Subproject commit 157cce105e1f0a369658dfb29cc802ebc09d0d93