* [bug#55422,done,0.2h,0h] Fix actions title empty error.

This commit is contained in:
wangyuting
2024-09-14 19:28:26 +08:00
committed by 刘刚
parent 09a3483950
commit 7fb163e3c6
+6 -2
View File
@@ -543,7 +543,7 @@ function initTableData(array $items, array &$fieldList, object $model = null, st
}
}
global $app;
global $app, $lang;
if(empty($model))
{
$module = $app->getModuleName();
@@ -612,7 +612,11 @@ function initTableData(array $items, array &$fieldList, object $model = null, st
if(count($item->actions) > $maxActionCount) $maxActionCount = count($item->actions);
}
if(isset($fieldList['actions'])) $fieldList['actions']['minWidth'] = $maxActionCount * 24 + 24;
if(isset($fieldList['actions']))
{
$fieldList['actions']['minWidth'] = $maxActionCount * 24 + 24;
if(empty($fieldList['actions']['title'])) $fieldList['actions']['title'] = $lang->actions;
}
if($fieldList['actions']['minWidth'] < 48) $fieldList['actions']['minWidth'] = 48;
return array_values($items);