fix: 延迟100ms重设图表尺寸(确保父容器已布局)

This commit is contained in:
qinglong
2026-06-14 14:47:46 +08:00
parent 7f7a3322fb
commit 11b1af43a6
+9
View File
@@ -283,6 +283,15 @@
} }
} catch(e) {} } catch(e) {}
} }
// 延迟确保父容器已布局
setTimeout(function(){
if (_chartInstances[id]) {
var chs = _chartInstances[id];
if (chs.cpu) chs.cpu.resize();
if (chs.mem) chs.mem.resize();
if (chs.net) chs.net.applyResize();
}
}, 100);
} }
// 更新通用信息 // 更新通用信息