From 0f467695e2d86866b3f672956f7e15e1e5f999e9 Mon Sep 17 00:00:00 2001 From: ajuner <106791576@qq.com> Date: Sat, 9 Jan 2021 22:09:34 +0800 Subject: [PATCH] fix: add opacity transition (#3510) --- components/vc-progress/src/Circle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/vc-progress/src/Circle.js b/components/vc-progress/src/Circle.js index 241e6902e..5e6af07b8 100644 --- a/components/vc-progress/src/Circle.js +++ b/components/vc-progress/src/Circle.js @@ -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`,