diff --git a/src/drawApp/lineApp.ts b/src/drawApp/lineApp.ts index 8f859ff..a3c796c 100644 --- a/src/drawApp/lineApp.ts +++ b/src/drawApp/lineApp.ts @@ -262,6 +262,12 @@ export async function loadLineDatas(app: GraphicApp) { }); let msgNotify: null | ((props?: QNotifyUpdateOptions | undefined) => void) = null; + Notify.create({ + type: 'negative', + timeout: 0, + position: 'top-right', + message: '通信链接已断开!', + }); app.on('websocket-connect-state-change', (connected) => { if (!connected && !msgNotify) { msgNotify = Notify.create({ @@ -272,6 +278,7 @@ export async function loadLineDatas(app: GraphicApp) { }); } else if (msgNotify && connected) { msgNotify(); + msgNotify = null; } }); const lineNetStore = useLineNetStore(); diff --git a/src/drawApp/lineNetApp.ts b/src/drawApp/lineNetApp.ts index 019ea0b..6db5851 100644 --- a/src/drawApp/lineNetApp.ts +++ b/src/drawApp/lineNetApp.ts @@ -152,6 +152,7 @@ export async function loadLineNetDatas(app: GraphicApp) { }); } else if (msgNotify && connected) { msgNotify(); + msgNotify = null; } }); } else {