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

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 = () => { const resizeCharts = () => {
if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.resize(); if (predictionChart) {
if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.resize(); predictionChart.resize();
}
if (historyChart) {
historyChart.resize();
}
}; };
window.addEventListener('resize', resizeCharts); window.addEventListener('resize', resizeCharts);
onUnmounted(() => { onUnmounted(() => {
window.removeEventListener('resize', resizeCharts); window.removeEventListener('resize', resizeCharts);
if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.dispose(); if (predictionChart) {
if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.dispose(); predictionChart.destroy();
}
if (historyChart) {
historyChart.destroy();
}
}); });
onMounted(() => { onMounted(() => {