JS 模板引擎,Juicer 0.5.4 穩定版發布
新版本主要改進記錄:
- 自定義helper函數支持傳參
- each支持object遍歷
- 數據源為數組情況下可在模板中通過"_" 取得源數據的引用。
Juicer 是一個高效、輕量的前端 (Javascript) 模板引擎,效率和易用是它追求的目標。 除此之外,它還可以運行在 Node.js 環境中。
{@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}
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!