* Fix bug #46517, append module name before title.
This commit is contained in:
@@ -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>'}); // 添加模块标签
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user