update
This commit is contained in:
@ -15,24 +15,33 @@ const Pagination = ({
|
||||
className={"w-full flex justify-center mt-2.5 h-10 items-center text-sm"}
|
||||
>
|
||||
{page <= 1 ? (
|
||||
<div className={"prev mx-3"}>上一页</div>
|
||||
<div className={"prev mx-3 text-gray-500 cursor-not-allowed"}>
|
||||
上一页
|
||||
</div>
|
||||
) : (
|
||||
<Link className={"next block mx-3"} href={`./${page - 1}`}>
|
||||
上一页
|
||||
</Link>
|
||||
)}
|
||||
{[...Array(pageCount)].map((el, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`page-item mx-3 ${
|
||||
page === index + 1 ? "text-[#009fe9]" : "text-[#666666]"
|
||||
}`}
|
||||
>
|
||||
{index + 1}
|
||||
</div>
|
||||
))}
|
||||
{[...Array(pageCount)].map((el, index) =>
|
||||
page === index + 1 ? (
|
||||
<div key={index} className={`page-item mx-3 text-[#009fe9]`}>
|
||||
{index + 1}
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
className={"page-item mx-3 text-[#666666]"}
|
||||
key={index}
|
||||
href={`./${index + 1}`}
|
||||
>
|
||||
{index + 1}
|
||||
</Link>
|
||||
),
|
||||
)}
|
||||
{page >= pageCount ? (
|
||||
<div className={"next mx-3"}>下一页</div>
|
||||
<div className={"next mx-3 text-gray-500 cursor-not-allowed"}>
|
||||
下一页
|
||||
</div>
|
||||
) : (
|
||||
<Link className={"next block mx-3"} href={`./${page + 1}`}>
|
||||
下一页
|
||||
|
Reference in New Issue
Block a user