update table 组件

This commit is contained in:
JaguarJack 2021-04-27 08:47:56 +08:00
parent 2955e17a6a
commit 08a835ccb9
2 changed files with 31 additions and 3 deletions

View File

@ -168,7 +168,7 @@ class CatchQuery extends Query
} }
$endPos = strpos($field, 'end_'); $endPos = strpos($field, 'end_');
if ($endPos === 0) { if ($endPos === 0) {
$this->where(str_replace('end_', '', $field), '>=', strtotime($value)); $this->where(str_replace('end_', '', $field), '<=', strtotime($value));
} }
// 模糊搜索 // 模糊搜索
if (Str::contains($field, 'like')) { if (Str::contains($field, 'like')) {

View File

@ -52,7 +52,7 @@ class Table
* *
* @var bool * @var bool
*/ */
protected $hiddenPaginate = false; protected $hidePagination = false;
/** /**
* tree table * tree table
@ -113,6 +113,20 @@ class Table
protected $usedModel; protected $usedModel;
/**
* 树状展开
*
* @var bool
*/
protected $defaultExpandAll;
/**
* 默认
*
* @var bool
*/
protected $border = true;
/** /**
* Table constructor. * Table constructor.
* @param string $ref * @param string $ref
@ -237,7 +251,21 @@ class Table
*/ */
public function withHiddenPaginate(): Table public function withHiddenPaginate(): Table
{ {
$this->hiddenPaginate = true; $this->hidePagination = true;
return $this;
}
/**
* 展开
*
* @time 2021年04月26日
* @param bool $expand
* @return $this
*/
public function expandAll($expand = true): Table
{
$this->defaultExpandAll = $expand;
return $this; return $this;
} }