import { copy } from "@/utils/utils"; import { DownOutlined } from "@ant-design/icons"; import { Badge, Button, Dropdown, Menu, Space } from "antd" import React from "react" function tableConfig(copyCreative: (data: any) => void): any { return [ { title: 'ID', dataIndex: 'id', key: 'id', align: 'center', width: 45, }, { title: '媒体账户', dataIndex: 'accountId', key: 'accountId', align: 'center', width: 80, render: (a: any, b: any) => { return {a || '--'} } }, { title: '商品ID', dataIndex: 'productId', key: 'productId', width: 150, ellipsis: true, render: (a: any, b: any) => { return {a || '--'} } }, { title: '品牌形象', dataIndex: 'promotedObjectId', key: 'promotedObjectId', width: 140, align: 'center', ellipsis: true, render: (a: any, b: any) => { return {a || '--'} } }, { title: '创建状态', dataIndex: 'createStatus', key: 'createStatus', align: 'center', width: 90, render: (a: any, b: any) => { if (a) { return a === 0 ? 创建中} /> : a === 100 ? 创建成功} /> : 创建失败} /> } else { return -- } } }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 150, ellipsis: true, render: (a: any, b: any) => { return {a || '--'} } }, { title: 失败原因, dataIndex: 'failMsg', key: 'failMsg', align: 'left', ellipsis: true, render: (a: any, b: any) => { return copy(a)}>{a || '--'} } }, // { // title: '操作', // dataIndex: 'cz', // key: 'cz', // width: 100, // align: 'center', // render: (a: any, b: any) => { // return { copyCreative(b) }}>批量复制) // } // ]} />}> // e.preventDefault()} style={{ fontSize: 12 }}> // // 操作 // // // // // } // } ] } export default tableConfig