Thymeleaf循环时 带上序号

使用Thymeleaf循环列表时,有时候须要在前端显示出序号, 这时可使用thymeleaf 循环的状态变量。前端 <tr th:each="service:${services}" > <td th:text="${serviceStat.index+1}"></td> <td th:text="${service.name}"></td> <td
相关文章
相关标签/搜索