今天发现胡说八道竟然没有分页,搞到我去看了这个前端半天,才知道怎么写

编程 / 2022-10-19
   <div class="bg-white p-4 hover:shadow-lg duration-300 mb-12" data-instant>
        <nav aria-label="Page navigation">
            <ul class="flex justify-between list-style-none space-x-3">
                <@paginationTag method="journals" page="${journals.number}" total="${journals.totalPages}" display="3">
                    <li class="page-item">
                        <#if pagination.hasPrev>
                            <a class="page-link relative block py-1.5 px-3 rounded border-0 bg-transparent outline-none transition-all duration-300 rounded text-gray-800 hover:text-gray-800 hover:bg-gray-200 focus:shadow-none"
                               href="${pagination.prevPageFullPath!}">上一页</a>
                        </#if>
                    </li>
                    <li>
                                    <span class="page-link relative block py-1.5 px-3 rounded border-0 outline-none transition-all duration-300 rounded text-gray-800 text-gray-800 bg-gray-200 shadow-none">
                                        ${journals.number + 1} / ${journals.totalPages}
                                    </span>
                    </li>

                    <li class="page-item">
                        <#if pagination.hasNext>
                            <a class="page-link relative block py-1.5 px-3 rounded border-0 bg-transparent outline-none transition-all duration-300 rounded text-gray-800 hover:text-gray-800 hover:bg-gray-200 focus:shadow-none"
                               href="${pagination.nextPageFullPath!}">下一页</a>
                        </#if>
                    </li>
                </@paginationTag>
            </ul>
        </nav>
    </div>

粤ICP备2022112743号 粤公网安备 44010502002407号