|
|
|
@ -396,12 +396,11 @@ class CommonExport implements FromCollection, WithStyles, WithColumnWidths, With
|
|
|
|
$header = array_values($this->fields);
|
|
|
|
$header = array_values($this->fields);
|
|
|
|
$moreFileds = [];
|
|
|
|
$moreFileds = [];
|
|
|
|
if (empty($clear)) {
|
|
|
|
if (empty($clear)) {
|
|
|
|
// 容错,取前三个数据
|
|
|
|
// 容错,取数据不是空的数组
|
|
|
|
$otherData = ($this->data[0]['data'] ?? null);
|
|
|
|
foreach ($this->data as $value) {
|
|
|
|
if (empty($otherData)) {
|
|
|
|
if (!empty($value['data'])) {
|
|
|
|
$otherData = ($this->data[1]['data'] ?? null);
|
|
|
|
$otherData = $value['data'];
|
|
|
|
if (empty($otherData)) {
|
|
|
|
break;
|
|
|
|
$otherData = ($this->data[2]['data'] ?? null);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|