art-template web模板引擎引入JS函数
可以在模板引擎中加入自定义的函数;
template.defaults.imports.LocalShortDate = LocalShortDate;
在模板引擎中的用法:
{{rec.add_time|LocalShortDate}}
这样就可以在模板引擎中使用函数了
网站:http://shibowl.top
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日