zoukankan      html  css  js  c++  java
  • Thymeleaf分页

    网上找到的例子回来测试一下

    <div class="table-pagination">
        <ul class="pagination">
            <li th:class="${contactsPage.number eq 0} ? 'disabled' : ''">
                <a th:if="${not contactsPage.firstPage}" th:href="@{${'/contacts'}(page=${contactsPage.number-1},size=${contactsPage.size})}">Previous</a>
                <a th:if="${contactsPage.firstPage}" href="javascript:void(0);">Previous</a>
            </li>
    
            <li th:each="pageNo : ${#numbers.sequence(0, contactsPage.totalPages - 1)}" th:class="${contactsPage.number eq pageNo}? 'active' : ''">
                <a th:if="${contactsPage.number  eq pageNo}" href="javascript:void(0);">
                    <span th:text="${pageNo + 1}"></span>
                </a>
                <a th:if="${not (contactsPage.number  eq pageNo)}" th:href="@{${'/contacts'}(page=${pageNo},size=${contactsPage.size})}">
                    <span th:text="${pageNo + 1}"></span>
                </a>
    
            </li>
            <li th:class="${contactsPage.number + 1 ge contactsPage.totalPages} ? 'disabled' : ''">
                <a th:if="${not contactsPage.lastPage}" th:href="@{${'/contacts'}(page=${contactsPage.number+1},size=${contactsPage.size})}">Next</a>
                <a th:if="${contactsPage.lastPage}" href="javascript:void(0);">Next</a>
            </li>
        </ul>
    </div>
  • 相关阅读:
    git连接远程分支
    如何找N个数中第i小的数
    DeconvNet
    深度学习中的Internal Convariate Shift (ICS)
    BA算法解决p-中位问题
    蚁群算法
    蝙蝠算法初探
    轨迹压缩之Douglas-Peucker算法之C++实现
    遗传算法---编程小试
    NYOJ 1000
  • 原文地址:https://www.cnblogs.com/hyl8218/p/5882071.html
Copyright © 2011-2022 走看看