fix: 更新数据面板的驱动方式

This commit is contained in:
Daniel
2026-03-02 23:21:07 +08:00
parent ef60f18cb0
commit 92914e6522
22 changed files with 427 additions and 62 deletions

View File

@@ -15,7 +15,7 @@ export function connectSituationWebSocket(onData: Handler): () => void {
ws.onmessage = (e) => {
try {
const msg = JSON.parse(e.data)
if (msg.type === 'situation' && msg.data) handler?.(msg.data)
if (msg.type === 'situation') handler?.({ situation: msg.data, stats: msg.stats })
} catch (_) {}
}
ws.onclose = () => {