lxw
2020-07-11 9db52f2f2dd3665fe9da1ae5657e0167c3a34d40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<div class="tpl-tbl-opts-tbl" id="tplTblOpts">
    <div class="tpl-tbl-opts-header">
        <table>
            <thead>
                <tr>
                    <th>编号</th>
                    <th>选项名称</th>
                    <th>选择</th>
                </tr> 
             </thead>
             <tbody>
                 {{# 
                     var rsCheck = function(status) {
                         var rs = '<input type="checkbox"/>';
                         if(status) {
                             rs = '<input type="checkbox"/ checked="checked">';
                         }
                         
                         return rs;
                     }
                 }}
             
                 {{# layui.each(d.tblData, function(index, item){ }}
                     <tr>
                         <td>{{= index+1 }}</td>
                         <td>{{ item.name }}</td>
                         <td>{{ rsCheck(item.status) }}</td>
                     </tr>
                 {{# }); }}
             </tbody>
        </table>
    </div>
</div>