需要在图中显示该属性
<div class="area-bd">
<ul class="videoList">
{{#each playVideos}}
<li>
<a href="{{url}}" target="_blank" class="video">
<!-- <img src="{{picUrl}}" width="350" height="192">-->
<img src="{{picUrl}}" width="350" height="192">
<span class="icon"></span>
<i class="tit">{{title}}</i>
</a>
<div class="labels">
<span >{{sourceName}} {{../productId}}</span>
{{#each labelNames}}
<a href="../info/tag{{splitHelper this ',' 2}}/{{../../productId}}_video.shtml" target="_blank">{{splitHelper this ',' 1}}</a>
{{/each}}
</div>
</li>
{{/each}}
</ul>
</div>
发现个很狗血的写法
如果有一个each 遍历在外面就要用 ../,如果是外面有一层each 里面还有一层each在each里面就要../../这样子写
数据结构如下:
{
productId: '123456',
playVideos: [{
title: 'xxxxxxx',
labelNames: [Array],
}]
}
|