63 lines
1.1 KiB
PHP
63 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
namespace Builder\View\Components\Attrs;
|
|
use Builder\Traits\JsonBuilder;
|
|
class Step extends JsonBuilder
|
|
{
|
|
|
|
protected $title;
|
|
protected $description;
|
|
protected $icon;
|
|
protected $status;
|
|
public static function make()
|
|
{
|
|
return new Step();
|
|
}
|
|
|
|
/**
|
|
* 标题
|
|
* @param mixed $title
|
|
* @return $this
|
|
*/
|
|
public function title($title)
|
|
{
|
|
$this->title = $title;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* 描述性文字
|
|
* @param string $description
|
|
* @return $this
|
|
*/
|
|
public function description($description)
|
|
{
|
|
$this->description = $description;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* 图标
|
|
* @param string $icon
|
|
* @return $this
|
|
*/
|
|
public function icon($icon)
|
|
{
|
|
$this->icon = $icon;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* 设置当前步骤的状态,不设置则根据 steps 确定状态
|
|
* @param mixed $status
|
|
* @return $this
|
|
*/
|
|
public function status($status)
|
|
{
|
|
$this->status = $status;
|
|
return $this;
|
|
}
|
|
|
|
|
|
}
|