分页计算页数
/**************** *@description:计算总页码 *@params:totalnum:总条数,limit:每页条数 *@version: V1.0.0 *************************************************************************/ export function pageCount (totalnum,limit){ return totalnum > 0 ? ((totalnum < limit) ? 1 : ((totalnum % limit) ? (parseInt(totalnum / limit) + 1) : (totalnum / limit))) : 0; }
道阻且长,行则将至!