feat: 图片lazy loading

This commit is contained in:
2026-08-12 18:15:41 +08:00
parent 67070e5fc4
commit 60131d6fa9
5 changed files with 135 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ const { list, total } = await http.get<ApiPageResponse<Post>>("posts", {
const totalPage = Math.ceil(total / metadata.postPageSize);
---
<Layout>
<Layout description="天若有情天亦老,人间正道是沧桑。" title="博客首页">
<IndexView
posts={list}
page={1}

View File

@@ -27,7 +27,7 @@ if (totalPage < Number(page)) {
}
---
<Layout>
<Layout description="天若有情天亦老,人间正道是沧桑。" title="博客首页">
<IndexView
posts={list}
page={Number(page)}