初始化仓库
This commit is contained in:
31
admin/components/UI/Table/Column/Progress.php
Normal file
31
admin/components/UI/Table/Column/Progress.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace admin\components\UI\Table\Column;
|
||||
|
||||
|
||||
/**
|
||||
* Class Progress
|
||||
*/
|
||||
class Progress implements Component
|
||||
{
|
||||
|
||||
private string $color;
|
||||
|
||||
/**
|
||||
* @param string $color
|
||||
*/
|
||||
public function __construct(string $color = 'default')
|
||||
{
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $label
|
||||
* @return array
|
||||
*/
|
||||
public function render($label): array
|
||||
{
|
||||
return (new \backend\components\UI\Widget\Progress("rowData.record['$label']"))->color($this->color)->render();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user