From e4e954dcf24962b771628bf3aae6c17201a09e4b Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Wed, 13 May 2026 15:57:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(utils):=20=E4=BF=AE=E5=A4=8D=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=85=AC=E5=91=8A=EF=BC=8CSSE=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=9C=AA=E8=A7=A3=E6=9E=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/sse.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/sse.ts b/src/utils/sse.ts index 2ac7ab58..af6c0310 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -37,16 +37,17 @@ export const initSSE = (url: string) => { watch(data, () => { if (!data.value) return; - useNoticeStore().addNotice({ - message: data.value, - read: false, - time: new Date().toLocaleString() - }); + let content = data.value; const noticeType = content.match(/\[dict\.(.*?)\]/)?.[1]; if (noticeType) { content = content.replace(`dict.${noticeType}`, $t(`dict.${noticeType}` as App.I18n.I18nKey)); } + useNoticeStore().addNotice({ + message: content, + read: false, + time: new Date().toLocaleString() + }); window.$notification?.create({ title: '消息', content,