TP5.1扩展分页、数组分页
2021-09-06 13:10:11 1KB tp5.1 分页 数组分页
数组分页 javascript中数组的简单分页 安装 npm install paginate - array 用法 const paginate = require ( "paginate-array" ) ; const collection = [ ... ] ; const paginateCollection = paginate ( collection [ , pageNumber , numItemsPerPage ] ) ; console . log ( paginateCollection ) { currentPage : 1 , perPage : 10 , total : 20 , totalPages : 2 , data : [ ... ] }
2021-05-29 12:03:05 18KB JavaScript
1