style: benchmark progress

This commit is contained in:
jialin
2026-02-03 20:50:40 +08:00
parent 42f24245b5
commit 5ad9ac277c
3 changed files with 43 additions and 120 deletions
+8 -2
View File
@@ -3,6 +3,7 @@ import { StatusType } from '@/config/types';
import { InfoCircleOutlined } from '@ant-design/icons';
import { Button, Divider, Tooltip } from 'antd';
import classNames from 'classnames';
import _ from 'lodash';
import React, { useMemo } from 'react';
import 'simplebar-react/dist/simplebar.min.css';
import styled from 'styled-components';
@@ -91,8 +92,13 @@ const StatusTag: React.FC<StatusTagProps> = ({
if (download && percent > 0 && percent <= 100) {
return (
<>
<span className="progress">{download?.percent || 0}%</span>
<span className="download" style={{ width: `${percent}%` }}></span>
<span className="progress">
{_.round(download?.percent, 0) || 0}%
</span>
<span
className="download"
style={{ width: `${_.round(percent, 0)}%` }}
></span>
</>
);
}