diff --git a/src/views/monitor/cache/info.vue b/src/views/monitor/cache/info.vue index d51bd284..53dd779a 100644 --- a/src/views/monitor/cache/info.vue +++ b/src/views/monitor/cache/info.vue @@ -16,7 +16,7 @@ import { getCache } from '@/api/monitor/cache'; import { reactive, ref, onMounted } from 'vue'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useI18n from '@/hooks/useI18n'; -const { t } = useI18n(); +const { t, currentLocale } = useI18n(); echarts.use([ ToolboxComponent, @@ -77,7 +77,11 @@ let cache: CacheType = reactive({ function commandStatsChart() { const commandStatsDom = document.getElementById('commandstats'); if (!commandStatsDom) return; - const commandStatsEchart = echarts.init(commandStatsDom); + const locale = currentLocale.value.split("_")[0] + const commandStatsEchart = echarts.init(commandStatsDom, 'light', { + // https://github.com/apache/echarts/tree/release/src/i18n 取值langEN.ts ==> EN + locale: locale.toUpperCase(), + }); const option: echarts.ComposeOption< | ToolboxComponentOption | TooltipComponentOption