MCPcopy Create free account
hub / github.com/baiwumm/react-admin / flagColumn

Function flagColumn

Xmw_web/src/components/TableColumns/index.tsx:125–139  ·  view source on GitHub ↗
(field: string)

Source from the content-addressed store, hash-verified

123 * @author: 白雾茫茫丶
124 */
125export const flagColumn = (field: string): ProColumns => {
126 return {
127 title: <FormattedMessage id={formatPerfix(ROUTES.MENUMANAGEMENT, field)} />,
128 dataIndex: field,
129 ellipsis: true,
130 hideInSearch: true,
131 width: 100,
132 align: 'center',
133 render: (_, record) => (
134 <Tag color={randomTagColor()}>
135 {get(find(FLAG_OPTS, { value: record[field] }), 'label', '--')}
136 </Tag>
137 ),
138 };
139};
140
141/**
142 * @description: 渲染表单标题

Callers 1

TableTemplateFunction · 0.90

Calls 3

formatPerfixFunction · 0.90
randomTagColorFunction · 0.90
getFunction · 0.85

Tested by

no test coverage detected