From 14ef43d2dcdd955b84f250faf879d83a2f31db50 Mon Sep 17 00:00:00 2001 From: cj01 <106791576@qq.com> Date: Fri, 8 Jan 2021 15:23:57 +0800 Subject: [PATCH] fix: add opacity transition --- 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 f3476cdc93..8b951253df 100644 --- a/components/vc-progress/src/Circle.js +++ b/components/vc-progress/src/Circle.js @@ -62,7 +62,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 { @@ -116,7 +116,8 @@ const Circle = defineComponent({ 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`, style: pathStyle,