From 65393b7809e482abc8c1bedec3f037fa194eb8e9 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 23 Feb 2022 16:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E5=8D=87=E7=BA=A7=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/App.vue | 2 +- resources/assets/js/components/RightBottom.vue | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index 70b296258..d6d315d7f 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -188,7 +188,7 @@ export default { return true; } } - this.$Electron.registerMsgListener('dispatch', (event, args) => { + this.$Electron.registerMsgListener('dispatch', args => { if (!$A.isJson(args)) { return; } diff --git a/resources/assets/js/components/RightBottom.vue b/resources/assets/js/components/RightBottom.vue index f1d9243dd..165ac52dd 100644 --- a/resources/assets/js/components/RightBottom.vue +++ b/resources/assets/js/components/RightBottom.vue @@ -44,8 +44,8 @@ export default { this.getReleases(); // if (this.$Electron) { - this.$Electron.registerMsgListener('downloadDone', (event, {result}) => { - if (result.name == this.repoData.name) { + this.$Electron.registerMsgListener('downloadDone', ({result}) => { + if (result.name == this.repoData.name && this.repoStatus !== 2) { this.downloadResult = result; this.releasesNotification() } @@ -202,6 +202,7 @@ export default { }, releasesNotification() { + const {tag_name, body} = this.repoReleases; $A.modalConfirm({ okText: this.$L('立即更新'), onOk: () => { @@ -224,12 +225,12 @@ export default { props: { color: 'volcano' } - }, this.repoReleases.tag_name) + }, tag_name) ]), h('MarkdownPreview', { class: 'notification-body', props: { - initialValue: this.repoReleases.body + initialValue: body } }), ])