Ver Fonte

Merge pull request #1555 from SmallRuralDog/patch-1

修复MongoDB 分页perPage错误
Jiang Qinghua há 3 anos atrás
pai
commit
9fa2d2d110
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      src/Grid/Model.php

+ 6 - 1
src/Grid/Model.php

@@ -535,7 +535,12 @@ class Model
             return;
         }
 
-        return $this->request->get($this->getPerPageName()) ?: $this->perPage;
+        $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage;
+        if ($perPage) {
+            return (int) $perPage;
+        }
+
+        return null;
     }
 
     /**