链街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.

38 lines
774 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. $form = GoodsActivityCopyForm::make()->payload(['id'=>$this->row->id,'name'=>$this->row->name]);
  16. $modal = Modal::make()
  17. ->xl()
  18. ->title($this->title)
  19. ->body($form)
  20. ->button($this->title);
  21. return $modal;
  22. }
  23. public function parameters()
  24. {
  25. return [
  26. 'id' => $this->row->id,
  27. 'name' => $this->row->name
  28. ];
  29. }
  30. }