正在显示
1 个修改的文件
包含
9 行增加
和
0 行删除
@@ -1449,6 +1449,15 @@ EOD; | @@ -1449,6 +1449,15 @@ EOD; | ||
1449 | if ($itemArr) { | 1449 | if ($itemArr) { |
1450 | $html .= ", searchList: " . $searchList; | 1450 | $html .= ", searchList: " . $searchList; |
1451 | } | 1451 | } |
1452 | + | ||
1453 | + // 文件、图片、权重等字段默认不加入搜索栏,字符串类型默认LIKE | ||
1454 | + $noSearchFiles = ['file$', 'files$', 'image$', 'images$', '^weigh$']; | ||
1455 | + if(preg_match("/" . implode('|', $noSearchFiles) . "/i", $field)){ | ||
1456 | + $html .= ", operate: false"; | ||
1457 | + }else if(in_array($datatype, ['varchar'])) { | ||
1458 | + $html .= ", operate: 'LIKE'"; | ||
1459 | + } | ||
1460 | + | ||
1452 | if (in_array($datatype, ['date', 'datetime']) || $formatter === 'datetime') { | 1461 | if (in_array($datatype, ['date', 'datetime']) || $formatter === 'datetime') { |
1453 | $html .= ", operate:'RANGE', addclass:'datetimerange'"; | 1462 | $html .= ", operate:'RANGE', addclass:'datetimerange'"; |
1454 | } elseif (in_array($datatype, ['float', 'double', 'decimal'])) { | 1463 | } elseif (in_array($datatype, ['float', 'double', 'decimal'])) { |
-
请 注册 或 登录 后发表评论