From a22a092ebd963aeef0c597187a3edf47aff96c41 Mon Sep 17 00:00:00 2001 From: vincentinttsh Date: Sun, 24 Jan 2021 17:12:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=9C=96=E6=AA=94=E7=9A=84?= =?UTF-8?q?=E3=80=8C=E5=88=AA=E9=99=A4=E3=80=8D=E6=8C=89=E9=88=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/components/main.vue | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/js/components/main.vue b/js/components/main.vue index fb28d35..8dd2edf 100644 --- a/js/components/main.vue +++ b/js/components/main.vue @@ -195,13 +195,17 @@ var mainWindow = { } }, 'generatePic': function () { - this.is_print = true; + var main = this + main.is_print = true; html2canvas(document.getElementById('course-table-div')).then(function (canvas) { var a = document.createElement('a'); a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream"); a.download = '課表.jpg'; a.click(); }); + setTimeout(function(){ + main.is_print = false; + }, 5000); }, 'share': function () { if (this.user != "") @@ -209,9 +213,6 @@ var mainWindow = { else this.login() }, - 'enableDelete': function () { - this.is_print = !this.is_print; - }, }, components: { 'course-table': courseTable, @@ -254,18 +255,14 @@ var mainWindow = {
-
+
-
+
-
-
-
-
-
+