You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
826 B
41 lines
826 B
<?php
|
|
|
|
namespace App\Admin\Actions\Grid\v3;
|
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
use App\Admin\Forms\v3\GoodsImageForm;
|
|
|
|
class GoodsImage extends RowAction
|
|
{
|
|
/**
|
|
* @return string
|
|
*/
|
|
protected $title = ' 图片 ';
|
|
|
|
public function render()
|
|
{
|
|
$id = $this->getKey();
|
|
|
|
$modal = Modal::make()
|
|
->xl()
|
|
->title($this->title)
|
|
->body(GoodsImageForm::make()->setKey($id)->payload([
|
|
'id'=>$this->row->id,
|
|
'name'=>$this->row->name,
|
|
'search'=>$_REQUEST,
|
|
'cover_img'=>$this->row->cover_img
|
|
]))
|
|
->button($this->title);
|
|
|
|
return $modal;
|
|
}
|
|
|
|
public function parameters()
|
|
{
|
|
|
|
return [
|
|
|
|
];
|
|
}
|
|
}
|