import { Popconfirm, Tag } from "antd"
import React from "react"
function columnsPos(handle: (data: any) => void) {
let newArr: any = [
{
title: 'ID',
dataIndex: 'id',
key: 'id',
align: 'center',
width: 60
},
{
title: '玩家ID',
dataIndex: 'userId',
key: 'userId',
align: 'center',
ellipsis: true,
width: 120
},
{
title: '玩家账号',
dataIndex: 'userName',
key: 'userName',
align: 'center',
width: 150,
ellipsis: true,
},
{
title: '玩家昵称',
dataIndex: 'userNickName',
key: 'userNickName',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '玩家注册时间',
dataIndex: 'regTime',
key: 'regTime',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '封禁时间',
dataIndex: 'banTime',
key: 'banTime',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '更新时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '当前封禁状态',
dataIndex: 'status',
key: 'status',
align: 'center',
width: 120,
render: (a: number) => {
if (a === 1) {
return 封禁
}
return 已解封
}
},
{
title: '操作',
dataIndex: 'cz',
key: 'cz',
align: 'center',
width: 80,
fixed: 'right',
render: (a: string, b: any) => (
{ handle && handle(b) }}
okText="是"
cancelText="否"
>
{b?.status === 1 ? '解封' : '封禁'}
)
}
]
return newArr
}
export default columnsPos