import { Progress } from 'antd'; import './index.less'; interface UitilBarProps { title?: string; percent: number; steps?: number; gapDegree?: number; strokeWidth?: number; size?: number; trailColor?: string; strokeColor?: string; } const UitilBar: React.FC = (props) => { const { percent, steps = 10, gapDegree = 170, strokeWidth = 10, title, size = 150, strokeColor, trailColor = 'rgba(221,221,221,.5)' } = props; const strokeColorFunc = (percent: number) => { if (percent <= 50) { return 'var(--color-chart-green)'; } if (percent <= 80) { return 'var(--color-chart-glod)'; } return 'var(--color-chart-red)'; }; return (
{title && {title}}
); }; export default UitilBar;