表格operat使用_if替代if

This commit is contained in:
2022-08-30 15:13:03 +08:00
parent bb1edee5e1
commit 361b711670
2 changed files with 7 additions and 7 deletions

View File

@@ -751,17 +751,17 @@ 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 };
operat._if = operat._if || function () { return true };
if (typeof operat.if == 'function') {
if (typeof operat._if == 'function') {
if (operat.if(data, operat) !== true) {
if (operat._if(data, operat) !== true) {
return '';
}
} else if (typeof operat.if == 'string') {
} else if (typeof operat._if == 'string') {
var ifValue = admin.table.returnColumnValue(data, operat.if, false);
var ifValue = admin.table.returnColumnValue(data, operat._if, false);
if (!ifValue) {
return ''