|
|
|
|
@ -264,22 +264,23 @@ const createLog = () => {
@@ -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) |
|
|
|
|
|