thymeleaf 双层for循环指定循环次数。

发布时间 2023-06-03 16:06:25作者: 张载zz
<div style="border:1px solid #ccc;margin-bottom: 10px;padding:12px;float:left;width:49%;margin-left:1%;" th:each="dict:${dics}">
    <span style="width:80%;display: block;">[[${dict.dictLabel}]]</span>

    <div  th:each="processList:${dict.processList} ">
        <span th:each="i:${#numbers.sequence(0, 0)}" style="width:80%;display: block;" class="progressBar" id="spaceused1">[[${processList.workRange}]]</span>

        <br>

        <div th:each="i:${#numbers.sequence(0, 2)}"  style="float: left;display: flex">
            <ul>
                <li>[[${processList.createUser}]]</li>
                <li>[[${processList.createTime}]]</li>
            </ul>
        </div>
    </div>
</div>

 传入数据的样式: