链街Dcat后台
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.

39 lines
807 B

  1. <?php
  2. namespace App\Admin\Actions\Grid\v3;
  3. use Dcat\Admin\Grid\RowAction;
  4. use Dcat\Admin\Widgets\Modal;
  5. use App\Admin\Forms\v3\GoodsActivityCopyForm;
  6. use Dcat\Admin\Widgets\Lazy;
  7. class GoodsActivityCopy extends RowAction
  8. {
  9. /**
  10. * @return string
  11. */
  12. protected $title = '复制';
  13. public function render()
  14. {
  15. $id = $this->getKey();
  16. $form = GoodsActivityCopyForm::make(['id'=>$this->row->id,'name'=>$this->row->name])->setKey($id);
  17. $modal = Modal::make()
  18. ->xl()
  19. ->title($this->title)
  20. ->body($form)
  21. ->button($this->title);
  22. return $modal;
  23. }
  24. public function parameters()
  25. {
  26. return [
  27. 'id' => $this->row->id,
  28. 'name' => $this->row->name
  29. ];
  30. }
  31. }