add:新增table组件
This commit is contained in:
36
extend/catcher/library/table/components/Button.php
Normal file
36
extend/catcher/library/table/components/Button.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace catcher\library\table\components;
|
||||
|
||||
class Button extends Component
|
||||
{
|
||||
protected $el = 'button';
|
||||
|
||||
|
||||
public function icon(string $icon): Button
|
||||
{
|
||||
$this->attributes['icon'] = $icon;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function text(string $text): Button
|
||||
{
|
||||
$this->attributes['label'] = $text;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function style(string $style): Button
|
||||
{
|
||||
$this->attributes['class'] = $style;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function click(string $click): Button
|
||||
{
|
||||
$this->attributes['click'] = $click;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user