From 1b43446b5caffa238ef227888452785e0eb32130 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 26 Feb 2025 18:24:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=AF=8F30?= =?UTF-8?q?=E7=A7=92=E6=9B=B4=E6=96=B0=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/WorkflowListView.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/workflow/WorkflowListView.vue b/src/views/workflow/WorkflowListView.vue index 1fd412af..a3b69919 100644 --- a/src/views/workflow/WorkflowListView.vue +++ b/src/views/workflow/WorkflowListView.vue @@ -13,6 +13,9 @@ const appMode = inject('pwaMode') && display.mdAndDown.value // 是否刷新 const isRefreshed = ref(false) +// 自动刷新定时器 +const autoRefresh = ref(null) + // 新增对话框 const addDialog = ref(false) @@ -37,6 +40,13 @@ function addDone() { onMounted(() => { fetchData() + autoRefresh.value = setInterval(fetchData, 30000) +}) + +onUnmounted(() => { + if (autoRefresh.value) { + clearInterval(autoRefresh.value) + } }) onActivated(() => {