三一莎莎 / yii2-columnlistview
此包最新版本(dev-master)没有可用的许可证信息。
dev-master
2018-11-13 14:46 UTC
Requires
- php: >=5.6
- yiisoft/yii2: ^2.0
This package is auto-updated.
Last update: 2024-09-14 03:53:38 UTC
README
此包允许您显示类似 ListView
的控件,但带有 Bootstrap 的网格系统。
需要 Yii2 2.* 版本和 PHP 5.* 或更高版本才能运行。
安装
composer require sanyisasha/yii2-columnlistview:dev-master
如何使用
use sanyisasha\yii2\columnlistview\widgets\ColumnListView; ... <?= ColumnListView::widget([ 'dataProvider' => $dataProvider, // ActiveDataProvider 'columns' => 4, // Number of columns, eg 4 'itemView' => '_item', // The itemView, same as in ListView 'options' => [ // Parent from ListView widget 'class' => 'items-container', // The main container what contains the whole *layout* (eg. pagination) ], 'itemOptions' => [ // Parent from ListView widget // The <div class="col-..."> item ], 'rowOptions' => [ // Only with this package // The <div class="row..."> item ], ]); ?>
如果您发现任何问题,请随时提交一个 issue。
作者
Molnár Sándor molnar.sandor@wwdh.hu
链接
Packagist: https://packagist.org.cn/packages/sanyisasha/yii2-columnlistview