fix: 缓存信息页面图表Echart语言数据设置
This commit is contained in:
8
src/views/monitor/cache/info.vue
vendored
8
src/views/monitor/cache/info.vue
vendored
@@ -16,7 +16,7 @@ import { getCache } from '@/api/monitor/cache';
|
|||||||
import { reactive, ref, onMounted } from 'vue';
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const { t } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
|
|
||||||
echarts.use([
|
echarts.use([
|
||||||
ToolboxComponent,
|
ToolboxComponent,
|
||||||
@@ -77,7 +77,11 @@ let cache: CacheType = reactive({
|
|||||||
function commandStatsChart() {
|
function commandStatsChart() {
|
||||||
const commandStatsDom = document.getElementById('commandstats');
|
const commandStatsDom = document.getElementById('commandstats');
|
||||||
if (!commandStatsDom) return;
|
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<
|
const option: echarts.ComposeOption<
|
||||||
| ToolboxComponentOption
|
| ToolboxComponentOption
|
||||||
| TooltipComponentOption
|
| TooltipComponentOption
|
||||||
|
|||||||
Reference in New Issue
Block a user