fix: type ref bug in tiny.ring
parent
29704a6197
commit
3b52792917
|
|
@ -3,9 +3,11 @@ import { PageContainer, ProCard, StatisticCard } from '@ant-design/pro-component
|
||||||
import { Card, Statistic } from 'antd';
|
import { Card, Statistic } from 'antd';
|
||||||
import RcResizeObserver from 'rc-resize-observer';
|
import RcResizeObserver from 'rc-resize-observer';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import type { TinyRingConfig } from '@ant-design/charts';
|
||||||
|
|
||||||
const percentRing = (percent: number, frontColor: string): React.JSX.Element => {
|
const percentRing = (percent: number, frontColor: string): React.JSX.Element => {
|
||||||
const config = {
|
const TinyRing = Tiny.Ring;
|
||||||
|
const config: TinyRingConfig = {
|
||||||
percent: percent / 100,
|
percent: percent / 100,
|
||||||
width: 120,
|
width: 120,
|
||||||
height: 120,
|
height: 120,
|
||||||
|
|
@ -25,7 +27,7 @@ const percentRing = (percent: number, frontColor: string): React.JSX.Element =>
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
return <Tiny.Ring {...config} />;
|
return <TinyRing {...config} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface IndexData {
|
interface IndexData {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue