Beetl 1.25 release improvement records include:
Beetl supports the same ternary logical expressions as JS, such:
Var c = a> 1? 'Li '; 'miao ';
Var d = B> 1? : 'OK ';
The last two operators of the expression can be omitted. The expression is null. In the example above, if B is greater than 1, d is null.
Loop Enhancement
You can also add the suffix LP To the loop variable name to indicate the current loop status, for example, for loop:
<% For (soft in list) {%>
SoftLP. size indicates the length
SoftLP. index indicates the current index, starting from 1
SoftLP. even returns true if the current row is an even number.
SoftLP. odd returns true if the current number of rows is an odd number.
SoftLP. first returns true if the current row is the first row.
SoftLP. last returns true if the current row is the last row.
The original soft_index and soft_size can still be used, but are no longer recommended. They will be removed from the document in the future.
Native continuous calls support:
Version 1.24 supports Native call, but does not support Native chain call. Now it supports
@ User. getWife () [0]. getName ();
Bug fixes
Fixed several issues that caused the template to fail to be compiled into class. We recommend that you upgrade the template.