define(["jquery", "easy-admin"], function ($, ea) { var init = { table_elem: '#currentTable', table_render_id: 'currentTableRenderId', index_url: 'system.article/index', add_url: 'system.article/add', edit_url: 'system.article/edit', delete_url: 'system.article/delete', export_url: 'system.auth/export', modify_url: 'system.auth/modify', authorize_url: 'system.auth/authorize', }; var Controller = { index: function () { ea.table.render({ init: init, toolbar:['refresh', [{ text: '添加', url: init.add_url, method: 'open', auth: 'add', class: 'layui-btn layui-btn-normal layui-btn-sm', icon: 'fa fa-plus ' }]] , cols: [[ {type: "checkbox"}, {field: 'id', width: 80, title: 'ID'}, // {field: 'img_pic', minWidth: 80, search: false, title: 'banner图', templet: ea.table.image}, {field: 'title', minWidth: 80, title: '标题'}, {field: 'type', minWidth: 80, title: '类型'}, {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'}, { width: 250, title: '操作', templet: ea.table.tool, operat: [ 'edit', 'delete' ] } ]], }); ea.listen(); }, add: function () { ea.listen(); }, edit: function () { ea.listen(); } }; return Controller; });