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 = {