猿问

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

<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>


繁华开满天机
浏览 355回答 1
1回答

哈士奇WWW

这是Handlebars.js模板引擎。{{#each this}}表示遍历当前对象。this表示当前的上下文。
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答