Thymeleaf
FCXIQAQ
这个作者很懒,什么都没留下…
展开
-
Thymeleaf轮播,每页固定条数
最近公司在用Thymeleaf做门户端,碰到点难题,记录下。需求:Thymeleaf轮播,每页固定2条。页数后台计算,先看代码:页面代码:<div class="item active" th:each="i:${#numbers.sequence(0,recommendPagination)}" th:class="${i eq 0 ? 'item active' : 'item'}"> <div class="lxf-box-list"> &原创 2020-11-20 11:39:01 · 770 阅读 · 1 评论 -
Thymeleaf循环,获取下标,并作不同处理
Thymeleaf循环,获取下标,并作不同处理 <span th:utext="${author.name}">Pan Bingxing</span> <sup th:each="i:${author.companyId}" th:text="${iStat.index eq 0 ? i : (','+i)}">1</sup>效果图是这样的:th:utext="${author.name}" 是后端拿到的Author原创 2020-11-19 16:58:28 · 3433 阅读 · 0 评论