feat: mermaid
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user