fix: add opacity transition (#3510)

pull/3523/head
ajuner 2021-01-09 22:09:34 +08:00 committed by GitHub
parent 6175fdbb0c
commit 0f467695e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,7 @@ function getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0,
strokeDasharray: `${(percent / 100) * (len - gapDegree)}px ${len}px`,
strokeDashoffset: `-${gapDegree / 2 + (offset / 100) * (len - gapDegree)}px`,
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 {
@ -117,7 +117,8 @@ const Circle = {
d: pathString,
stroke,
'stroke-linecap': strokeLinecap,
'stroke-width': ptg === 0 ? 0 : strokeWidth,
'stroke-width': strokeWidth,
'opacity': ptg === 0 ? 0 : 1,
'fill-opacity': '0',
},
class: `${prefixCls}-circle-path`,