feat: animated expansion of md-link
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user