<ul id="sortable">{{#each put.images}}
<li class="imageSort" id="{{this}}">
<div class="perant_edit_img">
<span class="del_img_edit">
<i class="fa fa-times"></i>
</span>
<img src="/uploads/items/{{this}}" alt="First slide">
</div>
</li>
{{/each}}
</ul>
我需要将此值添加到每个{{put.dirImg}}中,然后添加方式吗?
{{put.dirImg}}仅在每个外部打印,但每个内部都不打印!
答案 0 :(得分:1)
尝试一下。
<ul id="sortable">
{{#each put.images}}
<li class="imageSort" id="{{this}}">
<div class="perant_edit_img">
<span class="del_img_edit">
<i class="fa fa-times"></i>
</span>
<img src="/uploads/items/{{../dirImg}}{{this}}" alt="First slide">
</div>
</li>
{{/each}}
</ul>