From 89d0dd2a1d8ee5e1cf7e35b3cb6df054ea8f13db Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Thu, 11 Jun 2026 09:31:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E4=BC=98=E5=8C=96=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot --- src/store/modules/warnningList.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/store/modules/warnningList.ts b/src/store/modules/warnningList.ts index 29e80ed..be62ebf 100644 --- a/src/store/modules/warnningList.ts +++ b/src/store/modules/warnningList.ts @@ -26,11 +26,20 @@ export const useWarningListStore = defineStore('warningListStore', () => { console.error('获取消息列表失败', error); } } + async function handleAction(ids: string | number | Array) { + try { + await updateDemo(ids); + await getWarningList(); + } catch (error) { + console.error('处理告警失败', error); + } + } // 核心点:必须把需要暴露出去的变量和方法 return 出去! return { warningList, warningListTotal, - getWarningList + getWarningList, + handleAction }; });