Explorar el Código

修复无数据时导出报错问题

jqh hace 5 años
padre
commit
e8dca25067
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Grid/Exporters/ExcelExporter.php

+ 1 - 1
src/Grid/Exporters/ExcelExporter.php

@@ -30,7 +30,7 @@ class ExcelExporter extends AbstractExporter
                 return $this->buildData($times);
             });
         } else {
-            $exporter->data($this->buildData());
+            $exporter->data($this->buildData() ?: [[]]);
         }
 
         $exporter->headings($this->titles)->download($filename);