thymeleaf
木鱼wzh
这个作者很懒,什么都没留下…
展开
-
thymeleaf常用的一些标签属性
用thymeleaf模版,总结了下经常用到的一些属性:从后台传过来一个List,需要到前端页面显示,所以一般先进行判断——该List是否为空,然后才是加载内容,而有些页面加载的时候需要获取序号,具体代码如下:<th:block th:if="${not #lists.isEmpty(purchaseDemandList)}"> <li class="list-grou...转载 2019-02-27 10:35:52 · 810 阅读 · 0 评论 -
thymeleaf循环遍历
th:each属性用于迭代循环,语法:th:each="obj,iterStat:${objList}"迭代对象可以是Java.util.List,java.util.Map,数组等;iterStat称作状态变量,属性有: index:当前迭代对象的index(从0开始计算) count: 当前迭代对象的index(从1开始计算) size:被迭代对象的大小 c...转载 2019-02-27 10:38:21 · 2554 阅读 · 0 评论 -
Thymeleaf模板表达式
日期格式、组件提取等.${#dates.format(date)}${#dates.arrayFormat(datesArray)}${#dates.listFormat(datesList)}${#dates.setFormat(datesSet)}${#dates.format(date, 'dd/MMM/yyyy HH:mm')}${#dates.arrayFormat(date...转载 2019-02-27 10:42:49 · 209 阅读 · 0 评论 -
thymeleaf javascript取后台传入的数值
thymeleaf javascript取后台传入的数值<script th:inline="javascript"> /*<![CDATA[*/ var message = [[${message}]]; console.log(message); /*]]>*/ </script>...转载 2019-02-27 10:44:09 · 636 阅读 · 0 评论