Sfoglia il codice sorgente

Merge pull request #268 from wslsq/patch-2

rows无数据时会报错
Jiang Qinghua 5 anni fa
parent
commit
589a88c77d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/小部件/Table.php

+ 2 - 2
src/Widgets/Table.php → src/小部件/Table.php

@@ -30,12 +30,12 @@ class Table extends Widget
      * Table constructor.
      *
      * @param array $headers
-     * @param array $rows
+     * @param mixed $rows
      * @param array $style
      */
     public function __construct($headers = [], $rows = [], $style = [])
     {
-        if ($headers && ! $rows) {
+        if ($headers && $rows === false) {
             $rows = $headers;
             $headers = [];
         }