mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 10:16:00 +08:00
fix: retrieval value greater more than 1 caused ui problem (#4718)
This commit is contained in:
parent
1b2d862973
commit
5bcbcd3c57
@ -23,7 +23,7 @@ const ProgressBar: FC<{ percent: number; loading: boolean }> = ({ percent, loadi
|
|||||||
<div className={cn(s.progress, loading ? s.progressLoading : '')}>
|
<div className={cn(s.progress, loading ? s.progressLoading : '')}>
|
||||||
<div
|
<div
|
||||||
className={s.progressInner}
|
className={s.progressInner}
|
||||||
style={{ width: `${loading ? 0 : (percent * 100).toFixed(2)}%` }}
|
style={{ width: `${loading ? 0 : (Math.min(percent, 1) * 100).toFixed(2)}%` }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={loading ? s.progressTextLoading : s.progressText}>{loading ? null : percent.toFixed(2)}</div>
|
<div className={loading ? s.progressTextLoading : s.progressText}>{loading ? null : percent.toFixed(2)}</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user