vehicle-monitor/src/utils/chart.ts

15 lines
288 B
TypeScript
Raw Normal View History

2025-03-12 09:42:48 +08:00
import { useEventListener } from '@vueuse/core';
import type { EChartsType } from 'echarts';
/** 通用重置图表样式 */
export const debounceChart = (myChart: EChartsType) => {
useEventListener(
window,
'resize',
() => {
myChart.resize();
},
500
);
};