mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
support set an array to page method
This commit is contained in:
parent
703f9c8117
commit
420b5d4f17
@ -191,6 +191,10 @@ export default class extends think.base {
|
||||
if (page === undefined) {
|
||||
return this;
|
||||
}
|
||||
if(think.isArray(page)){
|
||||
listRows = page[1] || listRows;
|
||||
page = page[0];
|
||||
}
|
||||
page = parseInt(page) || 1;
|
||||
this._options.limit = [listRows * (page - 1), listRows];
|
||||
return this;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user