Property | Type | Description | |
---|---|---|---|
$currentPage | 当前页 | ||
$hasMore | 是否有下一页 | ||
$items | 数据集 | ||
$lastPage | 最后一页 | ||
$listRows | 每页的数量 | ||
$options | 一些配置 | ||
$simple | 是否为简洁模式 | ||
$total | 数据总数 |
Method | Description | |
---|---|---|
appends ( array | string $key, string | null $value = null ) | 添加URL参数 | |
currentPage ( ) | ||
fragment ( string | null $fragment ) | 设置URL锚点 | |
getCurrentPage ( string $varPage = 'page', integer $default = 1 ) : integer | 自动获取当前页码 | |
getCurrentPath ( ) : string | 自动获取当前的path | |
getUrlRange ( integer $start, integer $end ) : array | 创建一组分页链接 | |
hasPages ( ) : boolean | 数据是否足够分页 | |
lastPage ( ) | ||
listRows ( ) | ||
make ( $items, $listRows, null $currentPage = null, null $total = null, boolean $simple = false, array $options = [] ) : |
||
render ( ) : mixed | 渲染分页html | |
total ( ) |
Method | Description | |
---|---|---|
__construct ( $items, $listRows, $currentPage = null, $total = null, $simple = false, $options = [] ) | ||
buildFragment ( ) : string | 构造锚点字符串 | |
setCurrentPage ( $currentPage ) | ||
url ( $page ) : string | 获取页码对应的链接 |
protected __construct ( $items, $listRows, $currentPage = null, $total = null, $simple = false, $options = [] ) |
public static getCurrentPath ( ) : string | ||
return | string |