SessionLoginAction.php 532 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Module\Dev\Admin\Actions;
  3. use Dcat\Admin\Widgets\Modal;
  4. use UCore\DcatAdmin\Form\AbstractTool;
  5. class SessionLoginAction extends AbstractTool
  6. {
  7. protected $title = '登录';
  8. public function render()
  9. {
  10. // 实例化表单类并传递自定义参数
  11. $form = SessionLoginForm::make()->payload(['id' => $this->getKey()]);
  12. return Modal::make()
  13. ->lg()
  14. ->title($this->title())
  15. ->body($form)
  16. ->button($this->title());
  17. }
  18. }