This commit is contained in:
2023-04-10 17:20:48 +08:00
parent 94ebb18b7e
commit ee8b5fba20
3 changed files with 29 additions and 14 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ class Pagination extends Component
if ($this->_max > 0 && $this->_length + $this->_limit > $this->_max) {
$this->_limit = $this->_length + $this->_limit - $this->_max;
}
$data = $this->activeQuery->limit($this->_offset, $this->_limit)->get();
$data = $this->activeQuery->offset($this->_offset)->limit($this->_limit)->get();
$this->_offset += $this->_limit;
if (is_array($data)) {