更新分页导航前进后退按钮为箭头
This commit is contained in:
parent
21e188329f
commit
0da6f49311
@ -74,9 +74,13 @@ export default async function DynamicPage({ params, searchParams }) {
|
||||
slug: item.slug,
|
||||
title: item.title,
|
||||
image: item.image || item.cover || item.img || '',
|
||||
content: item.content || item.description || '',
|
||||
additional_title: item.additional_title || '',
|
||||
subtitle: item.subtitle || item.content || '',
|
||||
}));
|
||||
|
||||
// 新增:允许通过变量控制列数,默认4
|
||||
const listColumns = 4; // 可根据需要改为变量
|
||||
|
||||
return (
|
||||
<>
|
||||
<Banner componentName={bannerComponentName} />
|
||||
@ -85,7 +89,7 @@ export default async function DynamicPage({ params, searchParams }) {
|
||||
<div className="flex flex-col md:flex-row mx-[-15px] xl:mx-[-35px] lg:mx-[-20px]">
|
||||
<Category componentName={categoryComponentName} />
|
||||
<div className="flex-1 min-w-0 !px-[15px] max-w-full md:!px-[20px] lg:!px-[20px] xl:!px-[35px]">
|
||||
<ListPageTemplate items={listItems} basePath={currentPath} />
|
||||
<ListPageTemplate items={listItems} basePath={currentPath} columns={listColumns} />
|
||||
<div className="mt-8">
|
||||
<Pagination1
|
||||
currentPage={currentPage}
|
||||
|
||||
Binary file not shown.
@ -19,7 +19,9 @@ export default function Pagination1({ currentPage, totalPages, basePath }) {
|
||||
<ul className="pagination" style={{ display: 'inline-flex' }}>
|
||||
<li className={`page-item ${currentPage === 1 ? "disabled" : ""}`}>
|
||||
<a className="page-link" onClick={() => goToPage(currentPage - 1)}>
|
||||
Prev
|
||||
<span aria-hidden="true">
|
||||
<i className="uil uil-arrow-left before:content-['\e949']" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{[...Array(totalPages)].map((_, idx) => {
|
||||
@ -32,7 +34,9 @@ export default function Pagination1({ currentPage, totalPages, basePath }) {
|
||||
})}
|
||||
<li className={`page-item ${currentPage === totalPages ? "disabled" : ""}`}>
|
||||
<a className="page-link" onClick={() => goToPage(currentPage + 1)}>
|
||||
Next
|
||||
<span aria-hidden="true">
|
||||
<i className="uil uil-arrow-right before:content-['\e94c']" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user