style: 缓存信息页面标题翻译

This commit is contained in:
TsMask
2024-03-06 16:04:44 +08:00
parent 739025935a
commit 7339f45193
3 changed files with 15 additions and 4 deletions

View File

@@ -1186,6 +1186,7 @@ export default {
keyContent: "Cached content",
},
cacheInfo: {
baseInfo: "Basic Info",
version: "Service Versions",
mode: "Perating Mode",
modeStandalone: "stand-alone",

View File

@@ -1186,6 +1186,7 @@ export default {
keyContent: "缓存内容",
},
cacheInfo: {
baseInfo: "基本信息",
version: "服务版本",
mode: "运行模式",
modeStandalone: "单机",

View File

@@ -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(() => {
<template>
<PageContainer :loading="loading">
<a-card
title="基本信息"
:title="t('views.monitor.cacheInfo.baseInfo')"
:bordered="false"
:body-style="{ marginBottom: '24px', padding: 0 }"
>
@@ -207,7 +213,10 @@ onMounted(() => {
</a-descriptions>
</a-card>
<a-card :title="t('views.monitor.cacheInfo.commandstats')" :bordered="false">
<a-card
:title="t('views.monitor.cacheInfo.commandstats')"
:bordered="false"
>
<div id="commandstats" style="height: 400px; width: 100%"></div>
</a-card>
</PageContainer>