liyunfang/yii2-widget-linkpager
最新稳定版本:1.0.2
Composer 安装命令:
composer require liyunfang/yii2-widget-linkpager
包简介
yii2 Widget for LinkPager
README 文档
README
LinkPager widgets for Yii Framework 2.0
Increase the pageSize of the page drop-down box


Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist liyunfang/yii2-widget-linkpager
or add
"liyunfang/yii2-widget-linkpager": "*"
to the require section of your composer.json file.
Requirements
This extension require twitter-bootstrap
Usage
Once the extension is installed, simply use it in your code by :
GridView options
'filterSelector' => "select[name='".$dataProvider->getPagination()->pageSizeParam."'],input[name='".$dataProvider->getPagination()->pageParam."']", 'pager' => [ 'class' => \liyunfang\pager\LinkPager::className(), //'template' => '{pageButtons} {customPage} {pageSize}', //'pageSizeList' => [10, 20, 30, 50], //'pageSizeMargin' => 'margin-left:5px;margin-right:5px;', //'pageSizeOptions' => ['class' => 'form-control','style' => 'display: inline-block;width:auto;margin-top:0px;']; //'customPageWidth' => 50, //'customPageBefore' => ' Jump to ', //'customPageAfter' => ' Page ', //'customPageMargin' => 'margin-left:5px;margin-right:5px;', //'customPageOptions' => ['class' => 'form-control','style' => 'display: inline-block;margin-top:0px;']; ],
ModelSearch
public function search($params) { ... $pageSize = isset($params['per-page']) ? intval($params['per-page']) : 10; $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => ['pageSize' => $pageSize,], ]);
2015-09-16 重构代码,增加自定义跳转页面文本框
统计信息
- 总下载量: 33.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 47
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-07