diff --git a/ruoyi-ui-vue3/src/views/monitor/cache/index.vue b/ruoyi-ui-vue3/src/views/monitor/cache/index.vue index b3fadf7e4..ccca20d6d 100644 --- a/ruoyi-ui-vue3/src/views/monitor/cache/index.vue +++ b/ruoyi-ui-vue3/src/views/monitor/cache/index.vue @@ -98,7 +98,6 @@ function getList() { } ] }); - const usedmemoryInstance = echarts.init(usedmemory.value, "macarons"); usedmemoryInstance.setOption({ tooltip: { @@ -122,6 +121,10 @@ function getList() { } ] }) + window.addEventListener("resize",()=>{ + commandstatsIntance.resize() + usedmemoryInstance.resize() + }); }) } diff --git a/ruoyi-ui/src/views/monitor/cache/index.vue b/ruoyi-ui/src/views/monitor/cache/index.vue index 4cbba98d4..75832ab99 100644 --- a/ruoyi-ui/src/views/monitor/cache/index.vue +++ b/ruoyi-ui/src/views/monitor/cache/index.vue @@ -110,9 +110,6 @@ export default { } ] }); - window.addEventListener("resize",()=>{ - this.commandstats.resize() - }); this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons"); this.usedmemory.setOption({ tooltip: { @@ -137,6 +134,7 @@ export default { ] }); window.addEventListener("resize",()=>{ + this.commandstats.resize() this.usedmemory.resize() }); });