取得list的长度: ${list?size}
list_index 索引值 list_has_next 是否有下一个,boolean
${name!”“} name无值时显示”“
${dateObj?string(“yyyy-MM-dd”)} 时间格式化
${(isOpen)?string(“是”, “否”)} 根据布尔值显示字符
<#list users as user>
<#if user_index == 0>
first user
<#else>
other user
</#if>
</#list>
<#assign index = 1> <!--声明变量-->
<#assign index = index + 1> <!--变量赋值-->
${index} <!--访问变量-->
转载请注明原文地址: https://ju.6miu.com/read-150365.html