From ec2090567bcb42e9efe6a66c25eb910c5c695712 Mon Sep 17 00:00:00 2001 From: CPunisher <1343316114@qq.com> Date: Fri, 22 May 2020 19:20:05 +0800 Subject: [PATCH] download test --- src/utils/downloader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/downloader.js b/src/utils/downloader.js index 39d0fa8..67a5fec 100644 --- a/src/utils/downloader.js +++ b/src/utils/downloader.js @@ -10,7 +10,7 @@ export function saveSvg(value, content) { a.href = URL.createObjectURL(bl) a.download = filename a.hidden = true - // a.click() + a.click() } export function saveImg(value, content, width, height) { @@ -51,8 +51,8 @@ export function saveImg(value, content, width, height) { let data = canvas.toDataURL('image/jpeg', 0.8); a.setAttribute('href', data) a.setAttribute('target', 'download') - // a.setAttribute('download', filename); - // a.click(); + a.setAttribute('download', filename); + a.click(); resolve(data) };