修改curd生成单独的js

This commit is contained in:
2023-09-18 16:45:30 +08:00
parent 87516cdbc4
commit 996f7014ee
6 changed files with 155 additions and 151 deletions

View File

@@ -0,0 +1,10 @@
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',
};

View File

@@ -0,0 +1,3 @@
$(function(){
ua.listen();
})

View File

@@ -0,0 +1,3 @@
$(function(){
ua.listen();
})

View File

@@ -0,0 +1,10 @@
$(function(){
ua.table.render({
init: init,
cols: [[
{{indexCols}}
]],
});
ua.listen();
})

View File

@@ -1,34 +0,0 @@
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 () {
ua.table.render({
init: init,
cols: [[
{{indexCols}}
]],
});
ua.listen();
},
add: function () {
ua.listen();
},
edit: function () {
ua.listen();
},
};
return Controller;
});