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