fix: dashboard re-render

This commit is contained in:
jialin
2024-07-04 17:43:39 +08:00
parent ed3f9f7e96
commit e9d8828dcd
42 changed files with 240 additions and 1442 deletions
+2 -3
View File
@@ -8,7 +8,7 @@ import {
yAxis
} from '@/components/echarts/config';
import _ from 'lodash';
import { useEffect, useState } from 'react';
import { memo, useEffect, useState } from 'react';
import { ChartProps } from './types';
const BarChart: React.FC<ChartProps> = (props) => {
@@ -87,7 +87,6 @@ const BarChart: React.FC<ChartProps> = (props) => {
},
xAxis: {
...options.xAxis,
boundaryGap: true,
type: 'value',
splitLine: {
show: false
@@ -113,4 +112,4 @@ const BarChart: React.FC<ChartProps> = (props) => {
);
};
export default BarChart;
export default memo(BarChart);