From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/components/mkProgress/index.jsx | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/mkProgress/index.jsx b/src/components/mkProgress/index.jsx index 2060b30..007f05b 100644 --- a/src/components/mkProgress/index.jsx +++ b/src/components/mkProgress/index.jsx @@ -15,9 +15,14 @@ const { value, config, color } = this.props let type = config.showType || 'line' + let style = {} + + if (config.showInfo === 'true') { + style.color = config.infoColor || 'rgba(0, 0, 0, 0.65)' + } if (type === 'line') { - return <Progress percent={value} type="line" strokeWidth={config.strokeWidth || 8} strokeColor={color} showInfo={config.showInfo === 'true'}/> + return <Progress percent={value} type="line" style={style} className={config.strokeLinecap || ''} strokeWidth={config.strokeWidth || 8} strokeColor={color} showInfo={config.showInfo === 'true'}/> } let width = config.outlineWidth || 0 @@ -25,10 +30,11 @@ if (this.progress && (!width || width > this.progress.clientWidth)) { width = this.progress.clientWidth } + style.stroke = config.trailColor || '#f5f5f5' return ( <div ref={(ref) => this.progress = ref } style={{textAlign: config.textAlign || 'left'}}> - <Progress percent={value} width={width} type={type} strokeWidth={config.strokeWidth || 8} strokeColor={color} showInfo={config.showInfo === 'true'}/> + <Progress percent={value} width={width} style={style} strokeLinecap={config.strokeLinecap || 'round'} type={type} strokeWidth={config.strokeWidth || 8} strokeColor={color} showInfo={config.showInfo === 'true'}/> </div> ) } -- Gitblit v1.8.0