template.helper 多参数

<script type="text/html" id="text4">
    {{detail name classInfo schoolInfo}}
</script>
var users={
        name:"叶明龙",
        age:18,
        classInfo:{
            name:"二年级",
            teacher:"张老师"
        },
        schoolInfo:{
            name:"张珊一中"
        }


    }
    template.helper('detail',function (arg0,arg1,arg2) {
        return arg0+arg1.name+arg2.name;
    })

    document.write(template('text4', users));

如果这篇文章对您有帮助,您可以打赏我

技术交流QQ群:15129679

 
 
原文地址:https://www.cnblogs.com/yeminglong/p/9708731.html