表格operat新增if属性

This commit is contained in:
2022-08-08 14:54:52 +08:00
parent 2add792d01
commit aee24d4f09
2 changed files with 12 additions and 0 deletions

View File

@@ -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,

View File

@@ -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 = '';