Vanessa 2025-03-07 13:51:45 +08:00
parent c8f706f18d
commit 09e52d3c54

View File

@ -156,6 +156,16 @@ export const exportImage = (id: string) => {
item.parentElement.style.overflow = "hidden";
}
});
previewElement.querySelectorAll(".img img").forEach((item: HTMLImageElement) => {
const imgSrc = item.getAttribute("src");
if (imgSrc.endsWith(".svg")) {
fetchGet(item.src, (response: string) => {
item.src = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(response)))}`;
});
} else if (imgSrc.startsWith("assets/")) {
item.src = location.origin + "/" + imgSrc;
}
});
updateWatermark();
btnsElement[0].removeAttribute("disabled");
btnsElement[1].removeAttribute("disabled");