feat 优化报警消息暂存

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-06-11 09:31:18 +08:00
parent 47b272441c
commit 89d0dd2a1d

View File

@@ -26,11 +26,20 @@ export const useWarningListStore = defineStore('warningListStore', () => {
console.error('获取消息列表失败', error); console.error('获取消息列表失败', error);
} }
} }
async function handleAction(ids: string | number | Array<string | number>) {
try {
await updateDemo(ids);
await getWarningList();
} catch (error) {
console.error('处理告警失败', error);
}
}
// 核心点:必须把需要暴露出去的变量和方法 return 出去! // 核心点:必须把需要暴露出去的变量和方法 return 出去!
return { return {
warningList, warningList,
warningListTotal, warningListTotal,
getWarningList getWarningList,
handleAction
}; };
}); });