feat: animated expansion of md-link

This commit is contained in:
2026-02-26 17:44:58 +08:00
parent 2794b21a41
commit 31b6b57ec8
2 changed files with 34 additions and 9 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ export interface ArticleProps {
section?: string; // 指定要显示的标题(不含 #
onLoaded?: () => void;
onError?: (error: Error) => void;
class?: string; // 额外的 class 用于样式控制
}
async function fetchArticleContent(params: { src: string; section?: string }): Promise<string> {
@@ -39,7 +40,7 @@ export const Article: Component<ArticleProps> = (props) => {
});
return (
<article ref={articleRef} class="prose" data-src={props.src}>
<article ref={articleRef} class={`prose ${props.class || ''}`} data-src={props.src}>
<Show when={content.loading}>
<div class="text-gray-500">...</div>
</Show>