fix 修复 缓存监控图表 支持跟随屏幕大小自适应调整

This commit is contained in:
疯狂的狮子Li 2023-07-04 15:50:18 +08:00
parent e093b7b2ec
commit fc0a33e512
2 changed files with 5 additions and 4 deletions

View File

@ -98,7 +98,6 @@ function getList() {
} }
] ]
}); });
const usedmemoryInstance = echarts.init(usedmemory.value, "macarons"); const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
usedmemoryInstance.setOption({ usedmemoryInstance.setOption({
tooltip: { tooltip: {
@ -122,6 +121,10 @@ function getList() {
} }
] ]
}) })
window.addEventListener("resize",()=>{
commandstatsIntance.resize()
usedmemoryInstance.resize()
});
}) })
} }

View File

@ -110,9 +110,6 @@ export default {
} }
] ]
}); });
window.addEventListener("resize",()=>{
this.commandstats.resize()
});
this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons"); this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
this.usedmemory.setOption({ this.usedmemory.setOption({
tooltip: { tooltip: {
@ -137,6 +134,7 @@ export default {
] ]
}); });
window.addEventListener("resize",()=>{ window.addEventListener("resize",()=>{
this.commandstats.resize()
this.usedmemory.resize() this.usedmemory.resize()
}); });
}); });