From c5c3c9be71fc5cc8e7d359b914e2393db59afeb4 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Mon, 27 Nov 2023 14:30:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5table=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E5=85=83=E5=BC=82=E5=B8=B8=E6=AD=A3=E5=B8=B8=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/index.vue b/src/views/index.vue index a0becb88..62c1bfea 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -41,6 +41,10 @@ let tableColumns: ColumnsType = [ title: t('views.index.realNeStatus'), dataIndex: 'status', align: 'center', + customRender(opt) { + if (opt.value == 'Normal') return t('views.index.normal'); + return t('views.index.abnormal'); + }, }, { title: t('views.index.reloadTime'), @@ -172,7 +176,7 @@ function fnGetList() { }, series: [ { - name: t('views.index.realNeStatus') , + name: t('views.index.realNeStatus'), type: 'pie', radius: '70%', center: ['50%', '50%'], @@ -379,7 +383,7 @@ let timer: any; /** * 国际化翻译转换 */ - function fnLocale( ) { +function fnLocale() { let title = route.meta.title as string; if (title.indexOf('router.') !== -1) { title = t(title); @@ -388,7 +392,7 @@ let timer: any; } onMounted(() => { - fnLocale() + fnLocale(); fnGetList(); timer = setInterval(fnGetList, 10000); // 每隔10秒执行一次 });