mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
Support array for limit method in model
This commit is contained in:
parent
e9ab397d2d
commit
81828214a8
@ -184,6 +184,10 @@ export default class extends think.base {
|
||||
if (offset === undefined) {
|
||||
return this;
|
||||
}
|
||||
if(think.isArray(offset)){
|
||||
length = offset[1] || length;
|
||||
offset = offset[0];
|
||||
}
|
||||
offset = Math.max(parseInt(offset) || 0, 0);
|
||||
if(length){
|
||||
length = Math.max(parseInt(length) || 0, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user