|
|
|
@ -231,7 +231,7 @@ const EditableTable: React.FC<EditableTableProps> = ({
|
|
|
|
const processedColumns = [...columns];
|
|
|
|
const processedColumns = [...columns];
|
|
|
|
if (showDeleteButton && !columns.some(col => col.dataIndex === 'op')) {
|
|
|
|
if (showDeleteButton && !columns.some(col => col.dataIndex === 'op')) {
|
|
|
|
processedColumns.push({
|
|
|
|
processedColumns.push({
|
|
|
|
title: 'Operation',
|
|
|
|
title: '操作',
|
|
|
|
dataIndex: 'op',
|
|
|
|
dataIndex: 'op',
|
|
|
|
render: (_: any, record: any) => (
|
|
|
|
render: (_: any, record: any) => (
|
|
|
|
<Button onClick={() => removeRow(record.key)} type="primary" status="danger">
|
|
|
|
<Button onClick={() => removeRow(record.key)} type="primary" status="danger">
|
|
|
|
|