diff --git a/css/style.css b/css/style.css index 7b6911b..1c7192a 100644 --- a/css/style.css +++ b/css/style.css @@ -450,7 +450,7 @@ iconify-icon { -.flowchart { +#mermaidSvg { width: 100%; height: 100%; object-fit: contain; diff --git a/js/core/app-shell.js b/js/core/app-shell.js index 90f6742..6124811 100644 --- a/js/core/app-shell.js +++ b/js/core/app-shell.js @@ -1220,7 +1220,7 @@ if (!code.trim()) { throw new Error('缺少 Mermaid 代码,无法渲染'); } - const { svg } = await window.mermaid.render(renderId, code); + const { svg } = await window.mermaid.render("mermaidSvg", code); const updatedArtifact = { ...artifact, svgContent: svg