jeecg 分页精华

int row = dataGrid.getRows();
        int page = dataGrid.getPage();
        int firstRow = row * (page - 1);
        int maxRow = row * page;

dataGrid.setResults(ruleList);
        dataGrid.setTotal(ruleList.size()); 
        if (maxRow > ruleList.size()) {
            maxRow = ruleList.size();
        }
        dataGrid.setResults(ruleList.subList(firstRow, maxRow));
        TagUtil.datagrid(response, dataGrid);

 

posted @ 2021-04-06 18:55  薛柏梁  阅读(194)  评论(0编辑  收藏  举报