thymeleaf判断集合是否为空

1,256 阅读1分钟

集合

不为空:

th:if="${not #lists.isEmpty(copyUserList)}"

为空:

th:if="${#lists.isEmpty(copyUserList)}"

map 取值:

<script th:inline="javascript">
let status = [[${status}]]</script>