为了账号安全,请及时绑定邮箱和手机立即绑定

这段js代码是什么意思呀,each this是什么语法?

这段js代码是什么意思呀,each this是什么语法?

繁华开满天机 2019-02-14 13:23:04
<script id="userlist-list-temple" type="text/x-handlebars-template">    {{#each this}}    <tr data-id="{{id}}" class="rooms-xz">        <td class="hhhh">{{name}}</td>        <td class="22" style="display: none">{{area}}</td>        <td class="33" style="display: none">{{type}}</td>    </tr>    {{/each}}</script>
查看完整描述

1 回答

?
哈士奇WWW

TA贡献1799条经验 获得超6个赞

这是Handlebars.js模板引擎。
{{#each this}}表示遍历当前对象。
this表示当前的上下文。

查看完整回答
反对 回复 2019-02-16
  • 1 回答
  • 0 关注
  • 354 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信