问题调整

This commit is contained in:
fan 2023-07-27 17:47:04 +08:00
parent 7651f2485c
commit 4a1704dfc9
2 changed files with 8 additions and 0 deletions

View File

@ -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();

View File

@ -152,6 +152,7 @@ export async function loadLineNetDatas(app: GraphicApp) {
});
} else if (msgNotify && connected) {
msgNotify();
msgNotify = null;
}
});
} else {