Judgment syntax of layui template template

Use the ternary operator to judge the usage in the template:For example: the following is to set selected according to the data judgment when rendering the page<option value="0" {{ 0==d.iTop?'selected':''}}>Please select the priority</option>

write picture description here


Use the method of loop traversal in the template: (traverse again in the template)Refer here: http://www.layui.com/demo/laytpl.html


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325585209&siteId=291194637