mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
增加title,text回调函数调用;
This commit is contained in:
@@ -212,7 +212,7 @@ class AdminController extends BaseController
|
||||
*/
|
||||
protected function buildTableParames($excludeFields = [])
|
||||
{
|
||||
$get = $this->request->get('', null, null);
|
||||
$get = $this->request->get('', null, []);
|
||||
$page = isset($get['page']) && !empty($get['page']) ? $get['page'] : 1;
|
||||
$limit = isset($get['limit']) && !empty($get['limit']) ? $get['limit'] : 15;
|
||||
$group = isset($get['group']) && !empty($get['group']) ? $get['group'] : null;
|
||||
|
||||
@@ -47,6 +47,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
||||
'edit',
|
||||
[{
|
||||
text: '设置密码',
|
||||
titleField: 'username',
|
||||
url: init.password_url,
|
||||
method: 'open',
|
||||
auth: 'password',
|
||||
|
||||
@@ -778,15 +778,24 @@ define(["jquery", "ckeditor", 'miniTheme', 'tableData', 'citypicker', 'tagInput'
|
||||
operat.title = operat.title || operat.text;
|
||||
operat.text = operat.text || operat.title;
|
||||
|
||||
|
||||
var titleEndfix = '';
|
||||
|
||||
if (typeof operat.titleField == 'function') {
|
||||
titleEndfix = operat.titleField(data)
|
||||
console.log(operat.titleField(data, operat));
|
||||
titleEndfix = operat.titleField(data, operat)
|
||||
|
||||
} else if (data[operat.titleField]) {
|
||||
titleEndfix = '-' + data[operat.titleField];
|
||||
}
|
||||
|
||||
if (typeof operat.text == 'function') {
|
||||
operat.text = operat.text(data, operat)
|
||||
}
|
||||
|
||||
if (typeof operat.title == 'function') {
|
||||
operat.title = operat.title(data, operat)
|
||||
}
|
||||
|
||||
var formatOperat = operat;
|
||||
formatOperat.icon = formatOperat.icon !== '' ? '<i class="' + formatOperat.icon + '"></i> ' : '';
|
||||
formatOperat.class = formatOperat.class !== '' ? 'class="' + formatOperat.class + '" ' : '';
|
||||
|
||||
Reference in New Issue
Block a user