我使用symfony 5.2和easyadmin 3作为后端。在easyadmin 3中,有默认的分页样式,结构类似于以前的“下一个”。现在,我需要更改分页,比如第一次分页,第一次,第一个,
有没有任何方法来改变symfony easyadmin 3中的分页。
发布于 2021-02-16 20:24:09
找到了这个这里。它错过了第一个和最后一个选择,但也许这是一个开始。
public function configureCrud(Crud $crud): Crud
{
return $crud
[...]
// the number of pages to display on each side of the current page
// e.g. if num pages = 35, current page = 7 and you set ->setPaginatorRangeSize(4)
// the paginator displays: [Previous] 1 ... 3 4 5 6 [7] 8 9 10 11 ... 35 [Next]
// set this number to 0 to display a simple "< Previous | Next >" pager
->setPaginatorRangeSize(4)
[...]
;
}发布于 2022-02-01 12:50:09
现在使用EasyAdmin 4,这似乎是默认的:

第一页和最后一页的页码总是可见的,因此不需要额外的按钮(更多)。
https://stackoverflow.com/questions/65769609
复制相似问题