fix(Circle): the gradient color is incorrect (#7909)

This commit is contained in:
John
2021-01-15 15:15:17 +08:00
committed by GitHub
parent 959cfff423
commit ac1bb94343
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -96,8 +96,10 @@ export default createComponent({
const renderHover = () => {
const PERIMETER = 3140;
const { color, strokeWidth, currentRate, strokeLinecap } = props;
const { strokeWidth, currentRate, strokeLinecap } = props;
let { color } = props;
const offset = (PERIMETER * currentRate) / 100;
color = isObject(color) ? `url(#${id})` : color;
const style = {
stroke: `${color}`,
strokeWidth: `${+strokeWidth + 1}px`,
@@ -110,7 +112,7 @@ export default createComponent({
d={path.value}
style={style}
class={bem('hover')}
stroke={isObject(color) ? `url(#${id})` : color}
stroke={color}
/>
);
};