You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
work-portal/ruoyi-admin/src/main/resources/templates/search_page.html

50 lines
2.1 KiB

1 year ago
<div th:fragment="search_page">
<head>
<style>
.pag {text-align:center}
.pag .num{color: red;}
.pag a{
border:1px solid #000;
padding: 3px 10px;
}
</style>
</head>
<div class="pag" th:if="${page.pages > 0}">
<span>总记录</span>
<span class="num" th:text="${page.total}"></span>
<span></span>
<span>总页数</span>
<span class="num" th:text="${page.pages}"></span>
<span></span>
<span>当前第</span>
<span class="num" th:text="${page.pageNum}"></span>
<span></span>
<span>每页</span>
<span class="num" th:text="${page.pageSize}"></span>
<span></span>
<span th:if="${page.hasPreviousPage}">
<a th:href="@{${pageUrl}(p=1,title=${title})}" th:if="${not page.isFirstPage}">首页</a>
</span>
<span th:if="${page.hasPreviousPage}">
<a th:href="@{${pageUrl}(p=${page.prePage},title=${title})}" th:if="${not page.isFirstPage}">上一页</a>
</span>
<span th:each="nav:${page.navigatepageNums}"><!--navigatepageNums是一个数组遍历所有导航页号。 -->
<a th:href="@{${pageUrl}(p=${nav},title=${title})}" th:text="${nav}" th:if="${nav != page.pageNum && nav < 4}"></a>
<a th:class="${'active'}" th:if="${nav == page.pageNum}" th:text="${nav}"></a><!--如果是当前页则有样式。遍历 展示-->
</span>
<span th:if="${page.pages > 2}">
<a>...</a>
</span>
<span th:if="${page.hasNextPage}">
<a th:href="@{${pageUrl}(p=${page.nextPage},title=${title})}" th:if="${not page.isLastPage}">下一页</a>
</span>
<span th:if="${page.pageNum < page.pages}">
<a th:href="@{${pageUrl}(p=${page.pages},title=${title})}" th:if="${not page.isLastPage}">尾页</a>
</span>
</div>
<div style="height: 200px;text-align: center;padding-top: 50px;" th:if="${page.pages == 0}">
<img src="/home/base/nodata.png"/>
</div>
</div>