GridHeaderButtonPublic.php 614 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace UCore\DcatAdmin\Grid\Views;
  3. use UCore\DcatAdmin\Form\AbstractTool;
  4. use App\Module\System\Models\AdminGridView;
  5. use Illuminate\Support\Facades\Route;
  6. class GridHeaderButtonPublic extends GridHeaderButtonPrivate
  7. {
  8. public function render(): string
  9. {
  10. $url = $this->getUrl();
  11. $title =$this->adminGridView->title;
  12. // fa-bookmark 实心
  13. // fa-bookmark-o 空心
  14. $now = $this->getNowIcon();
  15. return "<a href='{$url}' class='btn btn-success'>
  16. <span class='d-none d-sm-inline'>
  17. &nbsp;&nbsp;{$title}
  18. </span> $now
  19. </a>";
  20. }
  21. }