From 394d1a48fd154fde5f9db022dfccbec5a7d52ec3 Mon Sep 17 00:00:00 2001
From: Linzm <1015157648@qq.com>
Date: Sat, 7 Jun 2025 16:03:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=96=E5=BA=97=E4=B8=8B=E8=BD=BD=E5=9B=BE?=
=?UTF-8?q?=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/badge/preview.vue | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/views/badge/preview.vue b/src/views/badge/preview.vue
index 4645d9d..a05ef9b 100644
--- a/src/views/badge/preview.vue
+++ b/src/views/badge/preview.vue
@@ -114,13 +114,13 @@
@@ -135,13 +135,13 @@
@@ -149,7 +149,7 @@
-
![]()
+
@@ -257,18 +257,21 @@ const createLog = () => {
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)
+ try {
+ const link = document.createElement('a')
+ link.href = url
+ link.download = '徽章效果图.png'
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ } catch (err) {
+ window.open(url, '_blank');
+ }
+
}
if (imageUrl.value) {
downloadImage(imageUrl.value)
- } else {
- showReload.value = true
}
}
const compareList = ref({})