fix: add opacity transition (#3510)
parent
6175fdbb0c
commit
0f467695e2
|
@ -63,7 +63,7 @@ function getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0,
|
||||||
strokeDasharray: `${(percent / 100) * (len - gapDegree)}px ${len}px`,
|
strokeDasharray: `${(percent / 100) * (len - gapDegree)}px ${len}px`,
|
||||||
strokeDashoffset: `-${gapDegree / 2 + (offset / 100) * (len - gapDegree)}px`,
|
strokeDashoffset: `-${gapDegree / 2 + (offset / 100) * (len - gapDegree)}px`,
|
||||||
transition:
|
transition:
|
||||||
'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s', // eslint-disable-line
|
'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s', // eslint-disable-line
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -117,7 +117,8 @@ const Circle = {
|
||||||
d: pathString,
|
d: pathString,
|
||||||
stroke,
|
stroke,
|
||||||
'stroke-linecap': strokeLinecap,
|
'stroke-linecap': strokeLinecap,
|
||||||
'stroke-width': ptg === 0 ? 0 : strokeWidth,
|
'stroke-width': strokeWidth,
|
||||||
|
'opacity': ptg === 0 ? 0 : 1,
|
||||||
'fill-opacity': '0',
|
'fill-opacity': '0',
|
||||||
},
|
},
|
||||||
class: `${prefixCls}-circle-path`,
|
class: `${prefixCls}-circle-path`,
|
||||||
|
|
Loading…
Reference in New Issue