修复切换标签也导致的bug
This commit is contained in:
parent
1452ac2dad
commit
6f46cff40e
@ -1180,7 +1180,9 @@ class DataMonitor extends HTMLElement {
|
|||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
this.isActive = false;
|
this.isActive = false;
|
||||||
// 清理所有图表窗口
|
// 清理所有图表窗口
|
||||||
this.chartWindows.forEach(window => {
|
this.chartWindows.forEach((window, windowId) => {
|
||||||
|
// 触发关闭事件,确保所有清理工作都完成
|
||||||
|
window.dispatchEvent(new CustomEvent('close'));
|
||||||
window.remove();
|
window.remove();
|
||||||
});
|
});
|
||||||
this.chartWindows.clear();
|
this.chartWindows.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user