Vanessa 2025-03-07 23:38:52 +08:00
parent 09e52d3c54
commit 3356f5b69b

View file

@ -3,7 +3,7 @@ import {escapeHtml} from "../../util/escape";
import * as path from "path"; import * as path from "path";
/// #endif /// #endif
import {hideMessage, showMessage} from "../../dialog/message"; import {hideMessage, showMessage} from "../../dialog/message";
import {fetchGet, fetchPost} from "../../util/fetch"; import {fetchPost} from "../../util/fetch";
import {Dialog} from "../../dialog"; import {Dialog} from "../../dialog";
import {addScript} from "../util/addScript"; import {addScript} from "../util/addScript";
import {isMobile} from "../../util/functions"; import {isMobile} from "../../util/functions";
@ -156,16 +156,7 @@ export const exportImage = (id: string) => {
item.parentElement.style.overflow = "hidden"; 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(); updateWatermark();
btnsElement[0].removeAttribute("disabled"); btnsElement[0].removeAttribute("disabled");
btnsElement[1].removeAttribute("disabled"); btnsElement[1].removeAttribute("disabled");