1.if条件写法:如果data非空则输出:test
<#if data?? >
test
</#if>

2.为空则输出

<#if !(data??) >
test
</#if>

 

3.表达式写法:

如果为空则输出:test

${(data)!'test'}

 

相关文章: