import { Tag, Switch, Tooltip, Space, Popconfirm } from 'antd'; export const modelColumns = () => [ { title: '/{cmd}', dataIndex: 'cmd', fixed: 'left', width: 120, key: 'cmd', render: (v: string) => /{v} }, { title: 'Act', dataIndex: 'act', key: 'act', width: 200, }, { title: 'Tags', dataIndex: 'tags', key: 'tags', width: 150, render: (v: string[]) => ( {v?.map(i => {i})} ), }, { title: 'Enable', dataIndex: 'enable', key: 'enable', width: 80, render: (v: boolean = false, row: Record, action: Record) => ( action.setRecord({ ...row, enable: v }, 'enable')} /> ), }, { title: 'Prompt', dataIndex: 'prompt', key: 'prompt', width: 300, render: (v: string) => ( {v} ), }, { title: 'Action', key: 'action', fixed: 'right', width: 120, render: (_: any, row: any, actions: any) => ( actions.setRecord(row, 'edit')}>Edit actions.setRecord(row, 'delete')} okText="Yes" cancelText="No" > Delete ), } ];