fix: 延迟100ms重设图表尺寸(确保父容器已布局)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新通用信息
|
// 更新通用信息
|
||||||
|
|||||||
Reference in New Issue
Block a user