From bec716bb3d909ac19f2d445ccc2105edcb0c424e Mon Sep 17 00:00:00 2001 From: Linzm <1015157648@qq.com> Date: Sat, 7 Jun 2025 16:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=BF=E6=8C=89=E5=9B=BE=E7=89=87=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/badge/preview.vue | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/views/badge/preview.vue b/src/views/badge/preview.vue index 18d3214..2b8ebe2 100644 --- a/src/views/badge/preview.vue +++ b/src/views/badge/preview.vue @@ -264,22 +264,23 @@ const createLog = () => { const showPreview = ref(false) function save() { // 下载图片到本地 - const downloadImage = (url: string) => { - const link = document.createElement('a') - link.href = url - link.download = '徽章效果图.png' - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - } + // const downloadImage = (url: string) => { + // const link = document.createElement('a') + // link.href = url + // link.download = '徽章效果图.png' + // document.body.appendChild(link) + // link.click() + // document.body.removeChild(link) + // } - if (imageUrl.value) { - try { - downloadImage(imageUrl.value); - } catch { - showPreview.value = true; // 自动下载失败时显示预览 - } - } + // if (imageUrl.value) { + // try { + // downloadImage(imageUrl.value); + // } catch { + // showPreview.value = true; // 自动下载失败时显示预览 + // } + // } + showPreview.value = true; } const compareList = ref({}) const extend_value = ref(0)