XTPL模板取值规则

{{#each(checkList)}}
{{#each(typeList)}}
{{#if (!isPassReady)}}
{{#if (__hasChecklistButton(../this.buttons,type,'pass') && status !== 'Pass')}}
<a class="cr-checklist-opertaion-link link-highlight" data-crid="{{../this.crId}}" data-type="{{type}}" data-action="pass" href="javascript:void(0)">验证通过</a>
{{/if}}
{{/if}}
{{/each}}
{{/each}}


注意 ../并不是按照数据结构一层一层往上跳的,而是按照上面的each循环的层数网上跳的


//XTPL中数组的索引获取方法

{{#each(array)}}
{{xindex}} {{this.name}}
{{/each}}


 




posted @ 2017-03-09 19:33  RoperLee  阅读(187)  评论(0)    收藏  举报