mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
增加title,text回调函数调用;
This commit is contained in:
@@ -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