import type { TinyRingConfig } from '@ant-design/charts'; import { Tiny } from '@ant-design/charts'; import { PageContainer, ProCard, StatisticCard } from '@ant-design/pro-components'; import { Card, Statistic } from 'antd'; import RcResizeObserver from 'rc-resize-observer'; import { useState } from 'react'; const percentRing = (percent: number, frontColor: string): React.JSX.Element => { const TinyRing = Tiny.Ring as (props: TinyRingConfig) => JSX.Element; const config: TinyRingConfig = { percent: percent / 100, width: 120, height: 120, color: ['#E8EFF5', frontColor], annotations: [ { type: 'text', style: { text: `${percent}%`, x: '50%', y: '50%', textAlign: 'center', fontSize: 16, fontStyle: 'bold', }, }, ], }; return ; }; interface IndexData { todayPT: number; report: number; oreo: number; totalPT: number; allSuccess: number; all: number; } const indexData: IndexData = { todayPT: 14, report: 8, oreo: 93, totalPT: 1145, allSuccess: 1818, all: 1919, }; const Logs: React.FC = () => { const [responsive, setResponsive] = useState(false); return ( { setResponsive(offset.width < 596); }} > 左侧内容 ), }} /> , }} chartPlacement="left" /> , }} chartPlacement="left" /> ); }; export default Logs;