echo GridView::widget([
'dataProvider' => $dataProvider,
//每列都有搜索框 控制器传过来$searchModel = new ArticleSearch();
//'filterModel' => $searchModel,
'layout'=> '{items}<div class="text-right tooltip-demo">{pager}</div>',
'pager'=>[
//'options'=>['class'=>'hidden']//关闭自带分页
'firstPageLabel'=>"首页",
'prevPageLabel'=>'上一页',
'nextPageLabel'=>'下一页',
'lastPageLabel'=>'未页',
],
'rowOptions' => function($model, $key, $index, $grid) {
if (in_array($model['id'],Yii::$app->params['ids'])!==false){
return ['class' => 'label-green'];
}
}
])