Browse Source

修复Grid::__toString()报错问题

jqh 4 years ago
parent
commit
23ee0fb6c6
2 changed files with 1 additions and 5 deletions
  1. 1 1
      src/Grid.php
  2. 0 4
      src/Support/Helper.php

+ 1 - 1
src/Grid.php

@@ -1116,6 +1116,6 @@ JS
 
     public function __toString()
     {
-        return $this->render();
+        return (string) $this->render();
     }
 }

+ 0 - 4
src/Support/Helper.php

@@ -97,10 +97,6 @@ class Helper
             $value = $value(...(array) $params);
         }
 
-        if ($value instanceof Grid) {
-            return (string) $value->render();
-        }
-
         if ($value instanceof Renderable) {
             return (string) $value->render();
         }