feat: mermaid

This commit is contained in:
2026-03-02 11:03:51 +08:00
parent e8ce7b7216
commit b737e9f4ea
6 changed files with 1297 additions and 35 deletions
+7
View File
@@ -87,6 +87,13 @@ export const HeadingNode: Component<{
const handleClick = (e: MouseEvent) => {
e.preventDefault();
navigate(href);
// 滚动到目标元素
requestAnimationFrame(() => {
const element = document.getElementById(anchor);
if (element) {
element.scrollIntoView({ behavior: "smooth", block: "start" });
}
});
};
const indent = props.depth * 12;