From 3b527929176b59282775e4221a02960740567170 Mon Sep 17 00:00:00 2001 From: Dawn1Ocean <1785590531@qq.com> Date: Sat, 6 Apr 2024 17:00:51 +0800 Subject: [PATCH] fix: type ref bug in tiny.ring --- src/pages/Welcome/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/Welcome/index.tsx b/src/pages/Welcome/index.tsx index 857cc22..501f1e7 100644 --- a/src/pages/Welcome/index.tsx +++ b/src/pages/Welcome/index.tsx @@ -3,9 +3,11 @@ import { PageContainer, ProCard, StatisticCard } from '@ant-design/pro-component import { Card, Statistic } from 'antd'; import RcResizeObserver from 'rc-resize-observer'; import { useState } from 'react'; +import type { TinyRingConfig } from '@ant-design/charts'; const percentRing = (percent: number, frontColor: string): React.JSX.Element => { - const config = { + const TinyRing = Tiny.Ring; + const config: TinyRingConfig = { percent: percent / 100, width: 120, height: 120, @@ -25,7 +27,7 @@ const percentRing = (percent: number, frontColor: string): React.JSX.Element => ], }; - return ; + return ; }; interface IndexData {