thymeleaf for循环第一次后中断循环

发布时间 2023-06-05 09:28:44作者: 张载zz

 

thymeleaf for循环第一次后中断循环
    <div  th:each="processList, iterStat : ${dict.processList}" >
        <th:block th:if="${iterStat.index == 0}">
        <span  style="width:80%;display: block;" class="progressBar" id="spaceused1">[[${processList.workRange}]]
        </span>
        </th:block>
        <br>
        <th:block th:unless="${iterStat.index == 0}">
            <!-- 在第一次循环后中断循环 -->
            <th:block th:break></th:block>
        </th:block>
    </div>