import React, { PropTypes } from 'react'; import { Table, Popconfirm, Pagination } from 'antd'; function UserList({ total, current, loading, dataSource, onPageChange, onDeleteItem, onEditItem, }) { const columns = [{ title: '姓名', dataIndex: 'name', key: 'name', render: (text) => {text}, }, { title: '年龄', dataIndex: 'age', key: 'age', }, { title: '住址', dataIndex: 'address', key: 'address', }, { title: '操作', key: 'operation', render: (text, record) => (

onEditItem(record)}>编辑   onDeleteItem(record.id)}> 删除

), }]; return (
record.id} pagination={false} /> ); } UserList.propTypes = { onPageChange: PropTypes.func, onDeleteItem: PropTypes.func, onEditItem: PropTypes.func, dataSource: PropTypes.array, loading: PropTypes.any, total: PropTypes.any, current: PropTypes.any, }; export default UserList;