by kevin
  
    2.   
      十一月 2020 10:18
  >
  
  
  
没有直接的方法,变通的方法是外层加一个th:block,内层写一个或者多个th:if和th:unless。
  举个例子:
             1: <th:block th:each="i:${#numbers.sequence(0,10)}" >
       2:     <a class="active" href="javascript:void(0);" th:if="${i==5" th:text="${i}"></a>
       3:     <a th:href="/${i}" th:unless="${i==5}" th:text="${i}"></a>
       4: </th:block>