* Fix bug #46517, append module name before title.

This commit is contained in:
liumengyi
2024-03-04 16:24:07 +08:00
parent 8f74049dfa
commit 5c7aeec9b7
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -41,8 +41,10 @@ window.onRenderCell = function(result, {row, col})
{
if(col.name == 'title')
{
const data = row.data;
const data = row.data;
const module = this.options.customData.modules[data.module];
if(data.color) result[0].props.style = 'color: ' + data.color;
if(module) result.unshift({html: '<span class="label gray-pale rounded-full">' + module + '</span>'}); // 添加模块标签
}
}
+1
View File
@@ -150,6 +150,7 @@ dtable
(
set::cols($cols),
set::data(array_values($tableData)),
set::customData(array('modules' => $modulePairs)),
set::onRenderCell(jsRaw('window.onRenderCell')),
set::userMap($users),
set::checkable($canBatchAction),