mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 18:42:49 +08:00
开始引入curd
This commit is contained in:
34
app/admin/service/curd/templates/static/js.code
Normal file
34
app/admin/service/curd/templates/static/js.code
Normal file
@@ -0,0 +1,34 @@
|
||||
define(["jquery", "easy-admin"], function ($, ea) {
|
||||
|
||||
var init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: '{{controllerUrl}}/index',
|
||||
add_url: '{{controllerUrl}}/add',
|
||||
edit_url: '{{controllerUrl}}/edit',
|
||||
delete_url: '{{controllerUrl}}/delete',
|
||||
export_url: '{{controllerUrl}}/export',
|
||||
modify_url: '{{controllerUrl}}/modify',
|
||||
};
|
||||
|
||||
var Controller = {
|
||||
|
||||
index: function () {
|
||||
ea.table.render({
|
||||
init: init,
|
||||
cols: [[
|
||||
{{indexCols}}
|
||||
]],
|
||||
});
|
||||
|
||||
ea.listen();
|
||||
},
|
||||
add: function () {
|
||||
ea.listen();
|
||||
},
|
||||
edit: function () {
|
||||
ea.listen();
|
||||
},
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
Reference in New Issue
Block a user