import { ElButton } from 'element-plus'

// import { ElButton, ElSwitch, ElPopconfirm } from 'element-plus'
import filterDate from '#/hooks/filterDate'

export default (event: {
  [key: string]: (...args: any[]) => void
}): TableColumn[] => [
  { label: '配置名称', prop: 'name', 'min-width': 200 },
  { label: '编码', prop: 'code', 'min-width': 200 },
  { label: '值', prop: 'value', 'min-width': 200 },
  {
    label: '创建时间',
    width: 160,
    'show-overflow-tooltip': true,
    render: (h, scope) => filterDate(scope.row.createTime),
  },
  {
    label: '操作',
    'min-width': 80,
    render: (h, scope) => {
      return (
        <div>
          <ElButton
            onClick={() => event.handleClick(1, scope.row)}
            type="primary"
          >
            编辑
          </ElButton>
          {/* <ElButton onClick={() => event.handleClick(2, scope.row)}>删除</ElButton> */}
        </div>
      )
    },
  },
]
