import React from 'react';
import { Form, Row, Col, Table, Button, Select, Popconfirm, LocaleProvider, message, Input, Modal } from 'antd';
class IntNalQuotaTest extends React.Component {
render() {
const columns = [
{ title: 'Name', dataIndex: 'name', key: 'name' },
];
const data = [];
for (let i = 0; i < 3; ++i) {
data.push({
name: 'Screem',
platform: 'iOS',
version: '10.3.4.5654',
upgradeNum: 500,
creator: 'Jack',
createdAt: '2014-12-24 23:12:00',
});
}
const expandedRowRender = () => {
return (
<div>测试测试测试测试</div>
);
};
return (
<Table bordered columns={columns} dataSource={data} expandedRowRender={expandedRowRender} />
);
};
};
export default Form.create()(IntNalQuotaTest);
如果要展开需要两个条件:
①给table加上rowkey这个关键字
②加上expandable关键字