import React, { Component } from 'react' import { Table } from 'antd' import './index.scss' type P = {} type S = { visible: boolean listDataSource: Array productId: string } class TableList extends Component { readonly state: S = { visible: false, listDataSource: [ { uid: 321933, userName: 'captain', realName: '路飞', roleName: '服务商', area: '上海、成都', createAt: Date.now(), updateAt: Date.now(), }, { uid: 321766, userName: 'captain', realName: '路飞', roleName: '服务商', area: '上海、成都', createAt: Date.now(), updateAt: Date.now(), }, ], productId: '', } showSpuModal = row => { this.setState({ visible: true, productId: row.productInfo.num, }) } handleConfirm = () => { this.setState({ visible: false, }) } handleCancel = () => { this.setState({ visible: false, }) } render() { const columns = [ { title: '用户名', dataIndex: 'userName', key: 'userName', }, { title: '真实姓名', dataIndex: 'realName', key: 'realName', }, { title: '角色', dataIndex: 'roleName', key: 'roleName', }, { title: '管辖地区', dataIndex: 'area', key: 'area', }, { title: '创建时间', dataIndex: 'createAt', key: 'createAt', }, { title: '更新时间', dataIndex: 'updateAt', key: 'updateAt', }, { title: '操作', dataIndex: 'actions', key: 'actions', render: () => { return ( <> 修改 清空角色 管辖地区 ) }, }, ] return (
) } } export default TableList