<script type="text/html" template lay-done="layui.data.done(d);">
    <table class="layui-table layui-form" lay-filter="LAY-app-SysRole-detailsForm" id="LAY-app-SysRole-detailsForm">
        <colgroup>
            <col width="150">
            <col>
        </colgroup>
        <tbody>

            <tr>
                <td>
                    <label for="id">角色id</label>
                </td>
                <td>
                    {{ d.params.data.id || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="roleName">角色名称</label>
                </td>
                <td>
                    {{ d.params.data.roleName || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="roleCode">角色标识</label>
                </td>
                <td>
                    {{ d.params.data.roleCode || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="comments">备注</label>
                </td>
                <td>
                    {{ d.params.data.comments || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="deleted">是否删除,0否,1是</label>
                </td>
                <td>
                    <input type="checkbox" disabled name="deleted" value="{{d.params.data.deleted}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="deleted" {{ d.params.data.deleted ? 'checked' : '' }}>
                </td>
            </tr>

            <tr>
                <td>
                    <label for="createTime">创建时间</label>
                </td>
                <td>
                    {{ d.params.data.createTime || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="updateTime">修改时间</label>
                </td>
                <td>
                    {{ d.params.data.updateTime || '' }}
                </td>
            </tr>
        </tbody>
    </table>
</script>
<script>
    var debug= layui.setter.debug;
    layui.data.done = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }

        layui.use(['admin', 'form', 'coreHelper'], function () {
            var $ = layui.$
                , setter = layui.setter
                , admin = layui.admin
                , coreHelper = layui.coreHelper
                , form = layui.form;
            form.render(null, 'LAY-app-SysRole-detailsForm');
        });
    };
</script>