From be6e91390efefd44123a733e2a105f5e03ea5fa8 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 6 Dec 2023 18:11:53 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=B8=BB=E9=A1=B5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/index.vue b/src/views/index.vue index 472dd85a..0894cdb2 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -141,9 +141,9 @@ let pronInfo: nfStateType = reactive({ }); /**查询网元状态列表 */ -function fnGetList() { +function fnGetList(one: boolean) { if (tableState.loading) return; - tableState.loading = true; + one && (tableState.loading = true); listMain().then(res => { tableState.data = res; tableState.loading = false; @@ -174,6 +174,7 @@ function fnGetList() { orient: 'vertical', left: 'left', }, + color: ['#91cc75', '#ee6666'], series: [ { name: t('views.index.realNeStatus'), @@ -393,8 +394,8 @@ function fnLocale() { onMounted(() => { fnLocale(); - fnGetList(); - timer = setInterval(fnGetList, 10000); // 每隔10秒执行一次 + fnGetList(true); + timer = setInterval(() => fnGetList(false), 10000); // 每隔10秒执行一次 }); // 在组件卸载之前清除定时器