@@ -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({})