* Fix dtable colspan without slice,bug#48857.

This commit is contained in:
qixinzhi
2024-05-21 02:40:43 +00:00
parent c8646921e7
commit 24b9ec4880
+4 -2
View File
@@ -189,9 +189,9 @@ class pivotZen extends pivot
$index = 0;
foreach($headerRow1 as $column)
{
/* 如果 colspan 属性不为空则表示该列包含切片字段。*/
/* 如果 colspan 属性不为空则且存在第二行表头表示该列包含切片字段。*/
/* If the colspan attribute is not empty, it means that the column contains slice fields. */
if(!empty($column->colspan) && $column->colspan > 1)
if(!empty($column->colspan) && $column->colspan > 1 && !empty($headerRow2))
{
/* 找到实际切片的字段。*/
/* Find the actual sliced field. */
@@ -233,6 +233,8 @@ class pivotZen extends pivot
$columnMaxLen[$field] = mb_strlen($column->label);
if(isset($column->colspan) && $column->colspan > 1) $columns[$field]['colspan'] = $column->colspan;
// if(isset($data->groups[$index])) $columns[$field]['fixed'] = 'left';
$index++;