* [task#134397,doing,0.3h] add render cell.

This commit is contained in:
sunguangming
2024-12-16 13:28:17 +08:00
committed by 王怡栋
parent bbba8db544
commit 49a374663f
+27
View File
@@ -21,3 +21,30 @@ $(document).off('click','.dtable-footer .batch-btn-repo').on('click', '.dtable-f
data: postData
});
});
window.renderTaskCell = function(result, info)
{
const task = info.row.data;
if(info.col.name == 'name' && result)
{
let html = '';
if(task.mode)
{
html += "<span class='label gray-pale rounded p-0 size-sm whitespace-nowrap'>" + multipleAB + "</span>";
}
if(task.isParent > 0)
{
html += "<span class='label gray-pale rounded p-0 size-sm whitespace-nowrap'>" + parentAB + "</span>";
}
else if(task.parent > 0)
{
html += "<span class='label gray-pale rounded p-0 size-sm whitespace-nowrap'>" + childrenAB + "</span>";
}
if(task.color) result[0].props.style = 'color: ' + task.color;
if(html) result.unshift({html});
}
return result;
}