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", keyContent: "Cached content",
}, },
cacheInfo: { cacheInfo: {
baseInfo: "Basic Info",
version: "Service Versions", version: "Service Versions",
mode: "Perating Mode", mode: "Perating Mode",
modeStandalone: "stand-alone", modeStandalone: "stand-alone",

View File

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

View File

@@ -126,9 +126,15 @@ function commandStatsChart() {
], ],
}; };
commandStatsEchart.setOption(option); commandStatsEchart.setOption(option);
window.addEventListener('resize', function () {
commandStatsEchart.resize(); // 创建 ResizeObserver 实例
var observer = new ResizeObserver(entries => {
if (commandStatsEchart) {
commandStatsEchart.resize();
}
}); });
// 监听元素大小变化
observer.observe(commandStatsDom);
} }
onMounted(() => { onMounted(() => {
@@ -152,7 +158,7 @@ onMounted(() => {
<template> <template>
<PageContainer :loading="loading"> <PageContainer :loading="loading">
<a-card <a-card
title="基本信息" :title="t('views.monitor.cacheInfo.baseInfo')"
:bordered="false" :bordered="false"
:body-style="{ marginBottom: '24px', padding: 0 }" :body-style="{ marginBottom: '24px', padding: 0 }"
> >
@@ -207,7 +213,10 @@ onMounted(() => {
</a-descriptions> </a-descriptions>
</a-card> </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> <div id="commandstats" style="height: 400px; width: 100%"></div>
</a-card> </a-card>
</PageContainer> </PageContainer>