diff --git a/tauri-app/src/pages/ContentManagement/MyWorks.tsx b/tauri-app/src/pages/ContentManagement/MyWorks.tsx index f94d5f3..c505ec6 100644 --- a/tauri-app/src/pages/ContentManagement/MyWorks.tsx +++ b/tauri-app/src/pages/ContentManagement/MyWorks.tsx @@ -374,6 +374,9 @@ export default function MyWorks() { const totalPages = Math.ceil(products.length / PAGE_SIZE); const paginatedProducts = products.slice((currentPage - 1) * PAGE_SIZE, currentPage * PAGE_SIZE); + const totalDraftPages = Math.ceil(drafts.length / PAGE_SIZE); + const paginatedDrafts = drafts.slice((currentPage - 1) * PAGE_SIZE, currentPage * PAGE_SIZE); + return (
{/* 页面标题和 Tab 区域 */} @@ -425,31 +428,44 @@ export default function MyWorks() { )} {activeTab === 'drafts' && ( -
- {drafts.length > 0 ? ( -
- {drafts.map(draft => ( - handleEditDraft(e, draft)} - onSave={saveDraftTitle} - onChange={setEditDraftTitle} - onDelete={e => openDeleteDraftModal(e, draft)} - /> - ))} -
- ) : ( -
-
-

暂无草稿

-

开始创作后会保存草稿在这里

+ <> +
+ {paginatedDrafts.length > 0 ? ( +
+ {paginatedDrafts.map(draft => ( + handleEditDraft(e, draft)} + onSave={saveDraftTitle} + onChange={setEditDraftTitle} + onDelete={e => openDeleteDraftModal(e, draft)} + /> + ))} +
+ ) : ( +
+
+

暂无草稿

+

开始创作后会保存草稿在这里

+
+ )} +
+ {totalDraftPages > 1 && ( +
+
+ + {Array.from({ length: totalDraftPages }, (_, i) => i + 1).map(page => ( + + ))} + +
)} -
+ )} )}