feat: update the generic idNameColumn

1. only show the first 8 character of the id
2. support id copy
3. bold the name to make it stand out
4. the idNameColumn can be used in the action codes

Change-Id: I5b0cdb0b1d76b795ae5dc83ebb3f6e8d3f4c3eec
This commit is contained in:
Jingwei.Zhang 2022-10-10 14:20:37 +08:00
parent 3026f4fca4
commit 88eb2ad8b6

View File

@ -275,10 +275,12 @@ export const idNameColumn = {
title: t('ID/Name'), title: t('ID/Name'),
dataIndex: 'name', dataIndex: 'name',
render: (value, record) => { render: (value, record) => {
const idRender = getIdRender(record.id, true, false);
const nameRender = getNameRenderWithStyle(value);
return ( return (
<> <>
<div>{record.id}</div> <div>{idRender}</div>
<div>{value}</div> {nameRender}
</> </>
); );
}, },