value => '未发货',
self::Processing->value => '已发货(部分)',
self::Finished->value => '已发货(全部)',
self::Received->value => '已收货',
];
}
public function text()
{
return data_get(self::options(), $this->value);
}
public function color()
{
return match ($this) {
static::None => 'dark',
static::Processing => 'warning',
static::Finished => 'danger',
static::Received => 'success',
};
}
public function label()
{
$color = $this->color();
$name = $this->text();
return "{$name}";
}
public function dot()
{
$color = $this->color();
$name = $this->text();
return " {$name}";
}
}