From 427f12ac07359ab98921887bb17265bc1d848233 Mon Sep 17 00:00:00 2001 From: itorr Date: Fri, 12 Aug 2022 20:05:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8C=89=E9=92=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=93=BE=E6=8E=A5=E5=85=83=E7=B4=A0=20#6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/document.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/document.js b/html/document.js index 674035b..cce362f 100644 --- a/html/document.js +++ b/html/document.js @@ -176,6 +176,8 @@ const data = { runing: false, convolutes, diff: false, + output: '', + downloadFilename: '[One-Last-Image].jpg' }; @@ -228,10 +230,8 @@ const app = new Vue({ chooseFile(readFileAndSetIMGSrc) }, save(){ - const a = document.createElement('a'); - a.href = this.$refs['canvas'].toDataURL('image/jpeg',.9); - a.download = `[lab.magiconch.com][One-Last-Image]-${+Date.now()}.jpg`; - a.click(); + this.output = this.$refs['canvas'].toDataURL('image/jpeg',.9); + this.downloadFilename = `[lab.magiconch.com][One-Last-Image]-${+Date.now()}.jpg`; }, toDiff(){ this.diff = true;