Skip to content

Commit 0f46769

Browse files
authored
fix: add opacity transition (#3510)
1 parent 6175fdb commit 0f46769

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: components/vc-progress/src/Circle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0,
6363
strokeDasharray: `${(percent / 100) * (len - gapDegree)}px ${len}px`,
6464
strokeDashoffset: `-${gapDegree / 2 + (offset / 100) * (len - gapDegree)}px`,
6565
transition:
66-
'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s', // eslint-disable-line
66+
'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s', // eslint-disable-line
6767
};
6868

6969
return {
@@ -117,7 +117,8 @@ const Circle = {
117117
d: pathString,
118118
stroke,
119119
'stroke-linecap': strokeLinecap,
120-
'stroke-width': ptg === 0 ? 0 : strokeWidth,
120+
'stroke-width': strokeWidth,
121+
'opacity': ptg === 0 ? 0 : 1,
121122
'fill-opacity': '0',
122123
},
123124
class: `${prefixCls}-circle-path`,

0 commit comments

Comments
 (0)