mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
表格operat新增if属性
This commit is contained in:
@@ -69,6 +69,13 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
|
||||
auth: 'add',
|
||||
class: 'layui-btn layui-btn-xs layui-btn-normal',
|
||||
extend: 'data-full="true"',
|
||||
if: function (data) {
|
||||
if (data.pid == 99999999) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}, {
|
||||
text: '编辑',
|
||||
url: init.edit_url,
|
||||
|
||||
@@ -744,6 +744,11 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
||||
operat.titleField = operat.titleField || 'title';
|
||||
operat.title = operat.title || operat.text;
|
||||
operat.text = operat.text || operat.title;
|
||||
operat.if = operat.if || function () { return true };
|
||||
|
||||
if (operat.if(data, operat) !== true) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var titleEndfix = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user