Skip to content

Commit 110304b

Browse files
authored
fix: add opacity transition (vueComponent#3505)
1 parent 6487412 commit 110304b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/vc-progress/src/Circle.js

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

6868
return {
@@ -116,7 +116,8 @@ const Circle = defineComponent({
116116
d: pathString,
117117
stroke,
118118
'stroke-linecap': strokeLinecap,
119-
'stroke-width': ptg === 0 ? 0 : strokeWidth,
119+
'stroke-width': strokeWidth,
120+
opacity: ptg === 0 ? 0 : 1,
120121
'fill-opacity': '0',
121122
class: `${prefixCls}-circle-path`,
122123
style: pathStyle,

0 commit comments

Comments
 (0)