value => '线上商城', self::Merchant->value => '线下门店', self::Scan->value => '扫码付款', ]; } public function text() { return data_get(self::options(), $this->value); } public function color() { return match ($this) { static::Online => 'primary', static::Merchant => 'warning', static::Scan => 'success', }; } public function label() { $color = $this->color(); $name = $this->text(); return "{$name}"; } public function dot() { $color = $this->color(); $name = $this->text(); return "  {$name}"; } }