From 864bef483f3aa2aaf34bd24536216d4ec0fc35f7 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 5 Sep 2019 13:54:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=97=A0=E6=B3=95=E5=BC=B9=E5=87=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 27d2057e..e3a0f3de 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -181,6 +181,11 @@ export default { }) }) }, + clearUpdateTimeout() { + if (!this.updateTimeout) return + clearTimeout(this.updateTimeout) + this.updateTimeout = null + }, }, beforeDestroy() { this.clearUpdateTimeout() @@ -189,10 +194,6 @@ export default { body.removeEventListener('mouseleave', this.enableIgnoreMouseEvents) } }, - clearUpdateTimeout() { - clearTimeout(this.updateTimeout) - this.updateTimeout = null - }, }