update pay function
This commit is contained in:
@@ -131,13 +131,18 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
|
||||
chartInstance.current?.resize();
|
||||
};
|
||||
window.addEventListener('resize', handleResize);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('resize', handleResize);
|
||||
};
|
||||
}, 100); // 延迟100ms等待Modal完全打开
|
||||
|
||||
return () => {
|
||||
clearTimeout(timer);
|
||||
window.removeEventListener('resize', () => {});
|
||||
chartInstance.current?.dispose();
|
||||
chartInstance.current = null;
|
||||
if (chartInstance.current) {
|
||||
chartInstance.current.dispose();
|
||||
chartInstance.current = null;
|
||||
}
|
||||
};
|
||||
}, [isOpen]);
|
||||
|
||||
|
||||
@@ -130,13 +130,18 @@ const TimelineChartModal: React.FC<TimelineChartModalProps> = ({
|
||||
chartInstance.current?.resize();
|
||||
};
|
||||
window.addEventListener('resize', handleResize);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('resize', handleResize);
|
||||
};
|
||||
}, 100); // 延迟100ms等待Modal完全打开
|
||||
|
||||
return () => {
|
||||
clearTimeout(timer);
|
||||
window.removeEventListener('resize', () => {});
|
||||
chartInstance.current?.dispose();
|
||||
chartInstance.current = null;
|
||||
if (chartInstance.current) {
|
||||
chartInstance.current.dispose();
|
||||
chartInstance.current = null;
|
||||
}
|
||||
};
|
||||
}, [isOpen]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user