Skip to content

Commit

Permalink
chore: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Dec 13, 2023
1 parent fb82de5 commit e17240f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DashboardAnalysis/src/components/IntroduceRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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!)}
/>
</ChartCard>
</Col>
Expand All @@ -89,7 +89,7 @@ const IntroduceRow = ({ loading, visitData = [] }: { loading: boolean; visitData
footer={<Field label="转化率" value="60%" />}
contentHeight={46}
>
<TinyColumn height={46} autoFit data={visitData.map((item) => item.y)} />
<TinyColumn height={46} autoFit data={visitData.map((item) => item.y!)} />
</ChartCard>
</Col>
<Col {...topColResponsiveProps}>
Expand Down
4 changes: 2 additions & 2 deletions DashboardAnalysis/src/components/TopSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const TopSearch = ({
subTotal={17.1}
/>

<TinyArea height={45} autoFit smooth data={visitData2.map((item) => item.y)} />
<TinyArea height={45} autoFit smooth data={visitData2.map((item) => item.y!)} />
</Col>
<Col sm={12} xs={24} style={{ marginBottom: 24 }}>
<NumberInfo
Expand All @@ -95,7 +95,7 @@ const TopSearch = ({
gap={8}
/>

<TinyArea height={45} autoFit smooth data={visitData2.map((item) => item.y)} />
<TinyArea height={45} autoFit smooth data={visitData2.map((item) => item.y!)} />
</Col>
</Row>
<Table<any>
Expand Down
14 changes: 12 additions & 2 deletions DashboardAnalysis/src/data.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
14 changes: 12 additions & 2 deletions DashboardWorkplace/src/data.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit e17240f

Please sign in to comment.