控制器(controller)页面 use \yii\data\Pagination; //引入这个类 public function actionList(){ $data = Clock::find()->select('*')->innerJoin('user','clock.user_id=user.id'); //联查 $pages = new Pagination(['totalCount'=>$data->count(),'pageSize'=>3]); $re…
public static class HtmlPager { public static MvcHtmlString MvcPager(this HtmlHelper html, string currentPageStr, int pageSize, int totalCount) { var queryString = html.ViewContext.HttpContext.Request.QueryString; int currentPage = 1; //当前页 var total…