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