Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
perf(tableColumns): customRender is easy (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tnon committed Mar 10, 2022
1 parent 7773992 commit e069f3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/system/permission/user/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export const baseColumns: TableColumnItem[] = [
align: 'center',
hideInSearch: true,
width: 220,
bodyCell: ({ record }) => (
//or bodyCell
customRender: ({ text }) => (
<Space>
{record.roleNames.map((item) => (
{text.map((item) => (
<Tag color={'success'} key={item}>
{item}
</Tag>
Expand Down

0 comments on commit e069f3c

Please sign in to comment.