测试数据(用JSON表示)
模板源码
{ "blocks":[ [0,0,19,100], [0,81,42,19], [23,0,19,19], [23,23,19,54], [46,0,42,19], [46,23,19,77], [69,81,19,19] ] }
<html style="margin:10px;" xmlns:c="http://www.xidea.org/ns/template/core"> <body> <c:for var="item" items="${blocks}"> <div style='position:absolute;background:#048;font-size:1px;left:${item[0]}px;top:${item[1]}px;width:${item[2]}px;height:${item[3]}px;'> </div> </c:for> <div style="float:right"><h2>这就是Lite的logo</h2></div> </body> </html>
测试模板
中间代码数据(标准/JS优化)
模板渲染结果
JSON数组形式的中间代码
模板渲染的目标代码
优化后的JS目标代码
-->前往 Lite GoogleCode首页