【发布时间】:2019-12-18 18:29:20
【问题描述】:
<div th:switch="${data.totalPercentage}">
<td th:case="100" th:text="${data.totalPercentage}"/>
<td th:case="*" th:text="${data.totalPercentage + '*'}" class="alert alert-warning font-weight-bold"/>
</div>
以上表达式有效,但我无法将 html 标记与 th:text 连接。我想将 * 替换为 fontawesome 标志图标 <i class="fas fa-flag"></i>。有什么建议吗?
【问题讨论】:
标签: spring-boot thymeleaf spring-boot-test