diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index c0821f7c..6619fcbd 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1186,6 +1186,7 @@ export default { keyContent: "Cached content", }, cacheInfo: { + baseInfo: "Basic Info", version: "Service Versions", mode: "Perating Mode", modeStandalone: "stand-alone", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 921e5b91..1921b3fc 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1186,6 +1186,7 @@ export default { keyContent: "缓存内容", }, cacheInfo: { + baseInfo: "基本信息", version: "服务版本", mode: "运行模式", modeStandalone: "单机", diff --git a/src/views/monitor/cache/info.vue b/src/views/monitor/cache/info.vue index cde68888..d51bd284 100644 --- a/src/views/monitor/cache/info.vue +++ b/src/views/monitor/cache/info.vue @@ -126,9 +126,15 @@ function commandStatsChart() { ], }; commandStatsEchart.setOption(option); - window.addEventListener('resize', function () { - commandStatsEchart.resize(); + + // 创建 ResizeObserver 实例 + var observer = new ResizeObserver(entries => { + if (commandStatsEchart) { + commandStatsEchart.resize(); + } }); + // 监听元素大小变化 + observer.observe(commandStatsDom); } onMounted(() => { @@ -152,7 +158,7 @@ onMounted(() => {