更新table组件
This commit is contained in:
parent
666b837327
commit
58aea6c0db
@ -84,4 +84,16 @@ trait ComponentsTrait
|
|||||||
{
|
{
|
||||||
return $this->component('preview', $field ? : $this->attributes['prop']);
|
return $this->component('preview', $field ? : $this->attributes['prop']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* download 组件
|
||||||
|
*
|
||||||
|
* @time 2021年05月05日
|
||||||
|
* @param null $field
|
||||||
|
* @return ComponentsTrait|HeaderItem
|
||||||
|
*/
|
||||||
|
public function withDownloadComponent($field = null)
|
||||||
|
{
|
||||||
|
return $this->component('download', $field ? : $this->attributes['prop']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,29 @@ class HeaderItem
|
|||||||
return $this->width(50)->type('selection');
|
return $this->width(50)->type('selection');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展开行
|
||||||
|
*
|
||||||
|
* @time 2021年05月07日
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function expand()
|
||||||
|
{
|
||||||
|
return $this->type('expand');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定列
|
||||||
|
*
|
||||||
|
* @time 2021年05月07日
|
||||||
|
* @param bool|string $fixed
|
||||||
|
* @return bool|mixed
|
||||||
|
*/
|
||||||
|
public function fixed($fixed = true)
|
||||||
|
{
|
||||||
|
return $this->attributes['fixed'] = $fixed;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dont export
|
* dont export
|
||||||
*
|
*
|
||||||
|
@ -104,6 +104,12 @@ class Table
|
|||||||
*/
|
*/
|
||||||
protected $excel = [];
|
protected $excel = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 斑马纹
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $stripe = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出 excel 所使用 model
|
* 导出 excel 所使用 model
|
||||||
@ -112,6 +118,12 @@ class Table
|
|||||||
*/
|
*/
|
||||||
protected $usedModel;
|
protected $usedModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定表头
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 树状展开
|
* 树状展开
|
||||||
@ -333,6 +345,33 @@ class Table
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启斑马纹
|
||||||
|
*
|
||||||
|
* @time 2021年05月07日
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function withStripe(): Table
|
||||||
|
{
|
||||||
|
$this->stripe = true;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定表头
|
||||||
|
*
|
||||||
|
* @time 2021年05月07日
|
||||||
|
* @param int $height
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function withHeight(int $height): Table
|
||||||
|
{
|
||||||
|
$this->height = $height;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出路由
|
* 导出路由
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user