ModalLazyRenderable.php 471 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace UCore\DcatAdmin\Traits;
  3. use UCore\DcatAdmin\Widgets\Button;
  4. use Dcat\Admin\Grid\Tools\RefreshButton;
  5. use Dcat\Admin\Widgets\Modal;
  6. trait ModalLazyRenderable
  7. {
  8. static public function makeModal()
  9. {
  10. $obj = static::make();
  11. $button = new Button($obj->title);
  12. $modal = Modal::make()
  13. ->lg()
  14. ->title($obj->title)
  15. ->body($obj)
  16. ->button($button);
  17. return $modal;
  18. }
  19. }