import React from 'react';
import { Modal, Table } from 'antd';

export default props => {
  const { visible, onCancel, dataSource } = props;
  const handleCancel = () => {
    onCancel();
  };
  const columns = [
    {
      title: '商品名称',
      width: 400,
      dataIndex: 'skuName',
    },
    {
      title: '商品属性',
      dataIndex: 'skuAttr',
    },
    {
      title: '商品件数',
      dataIndex: 'count',
    },
  ];
  return (
    <Modal title="订单详情" visible={visible} onCancel={handleCancel} footer={null} width={800}>
      <Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered />
    </Modal>
  );
};
