修复历史预测模块跳转异常

This commit is contained in:
LYFxiaoan 2025-07-22 11:11:46 +08:00
parent 0d3b89abf6
commit 038289ae32

View File

@ -1099,16 +1099,24 @@ const exportHistoryData = () => {
};
const resizeCharts = () => {
if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.resize();
if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.resize();
if (predictionChart) {
predictionChart.resize();
}
if (historyChart) {
historyChart.resize();
}
};
window.addEventListener('resize', resizeCharts);
onUnmounted(() => {
window.removeEventListener('resize', resizeCharts);
if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.dispose();
if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.dispose();
if (predictionChart) {
predictionChart.destroy();
}
if (historyChart) {
historyChart.destroy();
}
});
onMounted(() => {