Attempt to fix mermaid v10

This commit is contained in:
yuhan6665 2023-04-09 11:53:11 -04:00
parent 9504133f01
commit eb7b342dab

View File

@ -31,10 +31,11 @@ export default defineComponent({
theme: dark.value ? "dark" : "default",
});
mermaid.default.render(
chartID.value,
decodeURI(rawGraph.value),
(svgCode, bindFunc) => {
html.innerHtml = svgCode;
chartID.value!,
decodeURI(rawGraph.value!)
).then(
({svg, bindFunctions}) => {
html.innerHtml = svg;
}
);
});
@ -47,10 +48,11 @@ export default defineComponent({
theme: dark.value ? "dark" : "default",
});
mermaid.default.render(
chartID.value,
decodeURI(rawGraph.value),
(svgCode, bindFunc) => {
html.innerHtml = svgCode;
chartID.value!,
decodeURI(rawGraph.value!)
).then(
({svg, bindFunctions}) => {
html.innerHtml = svg;
}
);
});