refactor: reorg
This commit is contained in:
@@ -26,8 +26,6 @@ export const Article: Component<ArticleProps> = (props) => {
|
||||
fetchArticleContent
|
||||
);
|
||||
|
||||
let articleRef: HTMLArticleElement | undefined;
|
||||
|
||||
createEffect(() => {
|
||||
const data = content();
|
||||
if (data) {
|
||||
@@ -40,7 +38,7 @@ export const Article: Component<ArticleProps> = (props) => {
|
||||
});
|
||||
|
||||
return (
|
||||
<article ref={articleRef} class={`prose ${props.class || ''}`} data-src={props.src}>
|
||||
<article 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