JS 模板引擎,Juicer 0.5.4 稳定版发布

jopen 12年前
   <p>新版本主要改进记录:</p>    <ul>     <li>自定义helper函数支持传参</li>     <li>each支持object遍历</li>     <li>数据源为数组情况下可在模板中通过"_" 取得源数据的引用。</li>    </ul>    <p><img alt="JS 模板引擎,Juicer 0.5.4 稳定版发布" src="https://simg.open-open.com/show/5378e61488a6d2b7a1b5a9805231d9a3.jpg" width="460" height="346" /></p>    <p><a href="/misc/goto?guid=4958346800561492756" target="_blank">Juicer </a>是一个高效、轻量的前端 (Javascript) 模板引擎,效率和易用是它追求的目标。 除此之外,它还可以运行在 Node.js 环境中。</p>   <pre class="brush:javascript; toolbar: true; auto-links: false;">{@each list as item,index}      {@if index===3}          the index is 3, the value is ${item.prop}      {@else if index === 4}          the index is 4, the value is ${item.prop}      {@else}          the index is not 3, the value is ${item.prop}      {@/if}  {@/each}</pre>    <p></p>