From 1589efc6678d2aad0287a39c91ddc8a3a342b411 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Mon, 31 Mar 2025 20:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.vue | 127 ++++++++++++++++--------- src/renderer/store/modules/chat.js | 10 +- src/renderer/views/dashboard/index.vue | 82 ++++++---------- src/renderer/views/manage/index.vue | 73 +++++++------- 4 files changed, 150 insertions(+), 142 deletions(-) diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 953bc9e..16d3a1c 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -19,66 +19,32 @@ export default { if (that.$store.getters.token) { that.$store.dispatch('chat/initWebSocket') // 初始化websocket } + this.showNotify() + this.showNotify() + this.showNotify() + this.showNotify() }, watch: { '$store.state.chat.printer_error': { handler(val) { let that = this - const currentTime = dayjs().format('HH:mm:ss'); + const currentTime = dayjs().format('HH:mm:ss') if (val.message) { if (that.errors.indexOf(val.message) === -1) { that.errors.push(val.message) - that.$message({ - message: val.message, - type: val.type, - onClose() { - that.errors.splice(that.errors.indexOf(val.message), 1) - } - }) + that.showNotify({ time: currentTime, message: val.message, ...val }) } } if (val.notify) { if (that.errors.indexOf(val.notify) === -1) { that.errors.push(val.notify) - that.$notify({ - title: '温馨提示:' + currentTime, - message: val.notify, - type: val.type, - duration: 0, - onClose() { - that.errors.splice(that.errors.indexOf(val.notify), 1) - } - }) + that.showNotify({ time: currentTime, message: val.notify, ...val }) } } if (val.confirm) { if (that.errors.indexOf(val.confirm) === -1) { that.errors.push(val.confirm) - that.$notify({ - title: '温馨提示:' + currentTime, - duration: 0, - showClose: false, - dangerouslyUseHTMLString: true, - message: `