Juicer icon indicating copy to clipboard operation
Juicer copied to clipboard

使用内联辅助函数无法调用的问题

Open ghost opened this issue 9 years ago • 4 comments

{@helper subcontent} function(content) { return content.substr(0,20); } {@/helper}

{@each data.guides as item}

${item.desc|subcontent}
{@/each}

渲染模板的时候出现 Juicer Render Exception: Cannot read property 'call' of undefined

为啥啊?

ghost avatar Jul 21 '15 02:07 ghost

找到问题所在了,丫的build里的压缩文件是3年前的版本,坑死本宝宝了

ghost avatar Jul 23 '15 03:07 ghost

一模一样的问题,求解答

ziyang314 avatar Oct 09 '15 08:10 ziyang314

我也遇到了, js 里边 使用 juicer.register(a, b); 注册辅助函数解决。

Riant avatar Dec 30 '15 03:12 Riant

这个好像并不是BUG,而是需要在内联辅助函数后面导入juicer.js就可以了。项目里面的test测试了30多种juicer用法,都是PASS的 @ziyang314 @Riant

tkgkn avatar Jan 17 '17 09:01 tkgkn