{#if records.length > 0} {#if showCategory} {/if} {#if showDescription} {/if} {#each paginatedRecords as record, i} openDetail(record)} > {record.time.substring(0, 16)} {#if showCategory} {record.category} {/if} {record.merchant} {#if showDescription} {record.description || '-'} {/if} ¥{record.amount.toFixed(2)} {/each} {#if totalPages > 1}
显示 {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, sortedRecords.length)} 条,共 {sortedRecords.length} 条
{#each Array.from({ length: totalPages }, (_, i) => i + 1) as page} {#if page === 1 || page === totalPages || (page >= currentPage - 1 && page <= currentPage + 1)} {:else if page === currentPage - 2 || page === currentPage + 2} ... {/if} {/each}
{/if} {:else}
暂无记录
{/if}