1
This commit is contained in:
51
public/static/admin/js/article/article.js
Normal file
51
public/static/admin/js/article/article.js
Normal file
@ -0,0 +1,51 @@
|
||||
define(["jquery", "easy-admin"], function ($, ea) {
|
||||
|
||||
let init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: 'article.article/index',
|
||||
add_url: 'article.article/add',
|
||||
edit_url: 'article.article/edit',
|
||||
delete_url: 'article.article/delete',
|
||||
export_url: 'article.article/export',
|
||||
modify_url: 'article.article/modify',
|
||||
};
|
||||
|
||||
let Controller = {
|
||||
|
||||
index: function () {
|
||||
ea.table.render({
|
||||
init: init,
|
||||
cols: [[
|
||||
{type: "checkbox"},
|
||||
{field: 'id', width: 80, title: 'ID'},
|
||||
{field: 'title', minWidth: 200, title: '文章标题'},
|
||||
{field: 'cate_name', width: 120, title: '分类'},
|
||||
{field: 'author', width: 100, title: '作者'},
|
||||
{field: 'sort', width: 80, title: '排序', edit: 'text'},
|
||||
{field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch},
|
||||
{field: 'create_time', minWidth: 150, title: '创建时间'},
|
||||
{
|
||||
width: 250,
|
||||
title: '操作',
|
||||
templet: ea.table.tool,
|
||||
operat: ['edit', 'delete']
|
||||
}
|
||||
]],
|
||||
});
|
||||
|
||||
ea.listen();
|
||||
},
|
||||
|
||||
add: function () {
|
||||
ea.listen();
|
||||
},
|
||||
|
||||
edit: function () {
|
||||
ea.listen();
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
return Controller;
|
||||
});
|
||||
49
public/static/admin/js/article/cate.js
Normal file
49
public/static/admin/js/article/cate.js
Normal file
@ -0,0 +1,49 @@
|
||||
define(["jquery", "easy-admin"], function ($, ea) {
|
||||
|
||||
let init = {
|
||||
table_elem: '#currentTable',
|
||||
table_render_id: 'currentTableRenderId',
|
||||
index_url: 'article.cate/index',
|
||||
add_url: 'article.cate/add',
|
||||
edit_url: 'article.cate/edit',
|
||||
delete_url: 'article.cate/delete',
|
||||
export_url: 'article.cate/export',
|
||||
modify_url: 'article.cate/modify',
|
||||
};
|
||||
|
||||
return {
|
||||
index: function () {
|
||||
ea.table.render({
|
||||
init: init,
|
||||
cols: [[
|
||||
{type: "checkbox"},
|
||||
{field: 'id', width: 80, title: 'ID'},
|
||||
{field: 'title', minWidth: 150, title: '分类名称'},
|
||||
{field: 'sort', width: 100, title: '排序', edit: 'text'},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
width: 85,
|
||||
selectList: {0: '禁用', 1: '启用'},
|
||||
templet: ea.table.switch
|
||||
},
|
||||
{field: 'create_time', minWidth: 150, title: '创建时间'},
|
||||
{
|
||||
width: 250,
|
||||
title: '操作',
|
||||
templet: ea.table.tool,
|
||||
operat: ['edit', 'delete']
|
||||
}
|
||||
]],
|
||||
});
|
||||
|
||||
ea.listen();
|
||||
},
|
||||
add: function () {
|
||||
ea.listen();
|
||||
},
|
||||
edit: function () {
|
||||
ea.listen();
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user