小编Vin*_*cin的帖子

Thymeleaf - 布尔运算符

我如何使用类似andor使用Thymeleaf的布尔运算符?

例如,如果我想显示表中的数据,只有其中一个条件为真.

<tr th:if="firstCondition or secondCondition">
  <td th:text="${entity.attr1}"</td>
  <td th:text="${entity.attr2}">Default Value</td>
</tr>
Run Code Online (Sandbox Code Playgroud)

html boolean operators thymeleaf

11
推荐指数
2
解决办法
3万
查看次数

标签 统计

boolean ×1

html ×1

operators ×1

thymeleaf ×1