Bootstrap.php 886 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: 中闽 < 1464674022@qq.com >
  5. * Date: 2020/2/4
  6. * Time: 12:47
  7. */
  8. namespace paginate;
  9. class Bootstrap extends \think\paginator\driver\Bootstrap
  10. {
  11. /**
  12. * 渲染分页html
  13. * @return mixed
  14. */
  15. public function render()
  16. {
  17. if ($this->hasPages()) {
  18. if ($this->simple) {
  19. return sprintf(
  20. '<ul class="pager">%s %s</ul>',
  21. $this->getPreviousButton("上一页"),
  22. $this->getNextButton("下一页")
  23. );
  24. } else {
  25. return sprintf(
  26. '<ul class="pagination">%s %s %s</ul>',
  27. $this->getPreviousButton("上一页"),
  28. $this->getLinks(),
  29. $this->getNextButton("下一页")
  30. );
  31. }
  32. }
  33. }
  34. }