猫鼬 分页插件 注意:此插件仅适用于Node.js> = 4.2和Mongoose> = 4.2 安装 npm install mongoose-paginate 用法 将插件添加到架构,然后使用模型paginate方法: var mongoose = require ( 'mongoose' ) ; var mongoosePaginate = require ( 'mongoose-paginate' ) ; var schema = new mongoose . Schema ( { /* schema definition */ } ) ; schema . plugin ( mongoosePaginate ) ; var Model = mongoose . model ( 'Model' , schema ) ; // Model.paginate() Model.pag