Vanessa 2025-09-27 18:11:54 +08:00
parent 5e4ac24a64
commit c08dffd0a7
4 changed files with 11 additions and 7 deletions

View file

@ -37,7 +37,7 @@ export const chartRender = (element: Element, cdn = Constants.PROTYLE_CDN) => {
}
try {
if (!renderElement.lastElementChild || renderElement.childElementCount === 1) {
renderElement.innerHTML = `<span style="position: absolute;left:0;top:0;width: 1px;">${Constants.ZWSP}</span><div style="height:420px" contenteditable="false"></div>`;
renderElement.innerHTML = `<span style="position: absolute;left:0;top:0;width: 1px;">${Constants.ZWSP}</span><div style="height:${e.style.height || "420px"}" contenteditable="false"></div>`;
}
const chartInstance = window.echarts.getInstanceById(renderElement.lastElementChild?.getAttribute("_echarts_instance_"));
const option = await looseJsonParse(Lute.UnEscapeHTMLStr(e.getAttribute("data-content")));