2021-11-17 thymeleaf笔记

变量引用

<span th:text="${entry}"></span>

循环

    <li th:each="entry : ${extraValues}">
        <span th:text="${entry.key}"></span> :
        <span th:text="${entry.value}"></span>
    </li>

th:classappend

<img src="../images/hongbao.png" th:classappend="${entry.hongbao lt 30 ? 'grey' : ''}"/>
<div th:if="${hongbao}" class="button" id="button" th:classappend="${(before? 'grey_button' : '')}"></div>
<div th:unless="${status.index}==2" class="item" th:classappend="${(entry.value>0? '' : 'grey')} "
      th:styleappend="'background: url(../images/'+${entry.key}+'.png) no-repeat;'">
</div>

th:href

<a th:href="@{'https://remymartin.kehutech.com/transactionmanagement/purchaseorders/'+${orderId}}"></a>

th:text

<span th:text="${orderId}"></span>

th:if

<h3 th:if="${action=='reject'}">

计算

<div class="g-progress g-progress1" th:style="'width: ' + ${totalPoints/budget}* 100*0.8 + '%;'"></div>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容