import { copy } from "@/utils/utils" import { Space, Popconfirm, TableProps } from "antd" import React from "react" const columns = (del: (id: number) => void, edit: (data: any) => void): TableProps['columns'] => { const data: TableProps['columns'] = [ { title: '操作', dataIndex: 'cz', key: 'cz', align: 'center', width: 90, render: (_, b) => { return del(b.id)} okText="是" cancelText="否" > 删除 edit(b)}>修改 } }, { title: '微信小程序名称', dataIndex: 'appletName', key: 'appletName', width: 160, ellipsis: true, render: (a) => { return {a} } }, { title: '微信小程序原始ID', dataIndex: 'appletId', key: 'appletId', width: 180, ellipsis: true, render: (a) => { return copy(a)}>{a} } }, { title: '微信小程序路径', dataIndex: 'appletLink', key: 'appletLink', width: 380, ellipsis: true, render: (a) => { return copy(a)}>{a} } }, { title: '详细描述', dataIndex: 'description', key: 'description', ellipsis: true, render: (a) => { return {a || '--'} } }, { title: '创建人', dataIndex: 'createByName', key: 'createByName', align: 'center', width: 75, ellipsis: true, render: (a) => { return {a || '--'} } }, { title: '更新人', dataIndex: 'createByName', key: 'createByName', align: 'center', width: 75, ellipsis: true, render: (a) => { return {a || '--'} } }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 140, ellipsis: true, render: (a) => { return {a} } } ] return data } export default columns