From e17240ff22684659e35b9823acda0fe20b9aba0a Mon Sep 17 00:00:00 2001 From: xiaohuoni Date: Wed, 13 Dec 2023 14:45:21 +0800 Subject: [PATCH] chore: type error --- DashboardAnalysis/src/components/IntroduceRow.tsx | 4 ++-- DashboardAnalysis/src/components/TopSearch.tsx | 4 ++-- DashboardAnalysis/src/data.d.ts | 14 ++++++++++++-- DashboardWorkplace/src/data.d.ts | 14 ++++++++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/DashboardAnalysis/src/components/IntroduceRow.tsx b/DashboardAnalysis/src/components/IntroduceRow.tsx index 0255c79a..8dade629 100644 --- a/DashboardAnalysis/src/components/IntroduceRow.tsx +++ b/DashboardAnalysis/src/components/IntroduceRow.tsx @@ -70,7 +70,7 @@ const IntroduceRow = ({ loading, visitData = [] }: { loading: boolean; visitData line={{ color: '#975FE4', }} - data={visitData.map((item) => item.y)} + data={visitData.map((item) => item.y!)} /> @@ -89,7 +89,7 @@ const IntroduceRow = ({ loading, visitData = [] }: { loading: boolean; visitData footer={} contentHeight={46} > - item.y)} /> + item.y!)} /> diff --git a/DashboardAnalysis/src/components/TopSearch.tsx b/DashboardAnalysis/src/components/TopSearch.tsx index 38bc582a..62ebe838 100644 --- a/DashboardAnalysis/src/components/TopSearch.tsx +++ b/DashboardAnalysis/src/components/TopSearch.tsx @@ -77,7 +77,7 @@ const TopSearch = ({ subTotal={17.1} /> - item.y)} /> + item.y!)} /> - item.y)} /> + item.y!)} /> diff --git a/DashboardAnalysis/src/data.d.ts b/DashboardAnalysis/src/data.d.ts index e46742e0..60198b90 100644 --- a/DashboardAnalysis/src/data.d.ts +++ b/DashboardAnalysis/src/data.d.ts @@ -1,6 +1,16 @@ export interface DataItem { - x: string; - y: number; + x?: number | string; + y?: number; + y1?: number; + y2?: number; + index?: number; + keyword?: string; + count?: number; + range?: number; + status?: number; + date?: string; + type?: string; + value?: number; } export interface VisitDataType { diff --git a/DashboardWorkplace/src/data.d.ts b/DashboardWorkplace/src/data.d.ts index 26418916..4732dcaf 100644 --- a/DashboardWorkplace/src/data.d.ts +++ b/DashboardWorkplace/src/data.d.ts @@ -1,6 +1,16 @@ export interface DataItem { - x: string; - y: number; + x?: number | string; + y?: number; + y1?: number; + y2?: number; + index?: number; + keyword?: string; + count?: number; + range?: number; + status?: number; + date?: string; + type?: string; + value?: number; } export interface TagType {