多分支条件判断,我们可以使用th:switch属性来实现:
<div th:switch="${eval}">
<div th:case="1">我是1</div>
<div th:case="2">我是2</div>
<div th:case="3">我是3</div>
</div>只不过没有default属性,但是我们可以使用th:case="*"来代替:
<div th:case="*">我是Default</div>多分支条件判断,我们可以使用th:switch属性来实现:
<div th:switch="${eval}">
<div th:case="1">我是1</div>
<div th:case="2">我是2</div>
<div th:case="3">我是3</div>
</div>只不过没有default属性,但是我们可以使用th:case="*"来代替:
<div th:case="*">我是Default</div>